Commit graph

47 commits

Author SHA1 Message Date
Varniex
5d3f730824
Cleaning up some imports + Minor Bug fixed in VectorField (#2253)
* cleaning up imports

* sample_points -> sample_coords
2024-12-05 14:42:46 -08:00
Grant Sanderson
0804109301 Flatten uniform arrays 2024-09-21 12:15:37 -04:00
Grant Sanderson
6d23df0497 Clean up changes associated with fixing aspect ratio issue 2024-09-06 12:50:19 -05:00
Grant Sanderson
2178ec2b85
Merge branch 'master' into fix-aspect-ratio 2024-09-06 10:24:42 -07:00
Grant Sanderson
e7c540f415 Move texture id tracking to ShaderWrapper
Rather than having a globally unique id for each texture, dynamically allocate new texure ids within each ShaderWrapper, so that there is no upper bound on how many textures can be used.
2024-09-06 11:07:38 -05:00
Grant Sanderson
79ec791fc2 Move get_fill_canvas into VShaderWrapper 2024-08-21 09:02:22 -05:00
Grant Sanderson
dfc5f152dd Have border width pre-multiply by alpha, and don't use a separate texture for that border width 2024-08-20 22:03:45 -05:00
Grant Sanderson
6223623b40 Ensure border width blends better within filled VMobject for opacity < 1 2024-08-19 21:39:53 -05:00
Grant Sanderson
7217c9fca5 Reorganize VShaderWrapper.render_fill 2024-08-19 20:51:37 -05:00
Grant Sanderson
3b5d63d2fa Add depth shader to handle winding fill depth test. 2024-08-19 14:09:07 -05:00
Grant Sanderson
4a6e6ca646 Double the size of the fill canvas, to effectively do msaa 2024-08-16 12:04:27 -05:00
Grant Sanderson
c7acbe5de6 Brighten up fill 2024-08-15 10:53:46 -05:00
Grant Sanderson
41ece958fd Explicitly call out global naure of ID_TO_TEXTURE map 2024-01-17 15:02:19 -06:00
german2020
65e7943ff7 fix aspect_ratio other than 16:9 issue 2023-08-27 13:51:54 +08:00
Grant Sanderson
4f42ebeb4f Small formatting tweaks 2023-06-10 09:26:20 -07:00
Grant Sanderson
7c561d3757 Edit set_program_uniform 2023-02-03 11:05:40 -08:00
Grant Sanderson
ac3db9b636 Add set_program_uniform function 2023-02-02 21:13:18 -08:00
Grant Sanderson
c3823e722d Update fill shader alpha blending, and simplify the fill canvas 2023-02-02 11:28:20 -08:00
Grant Sanderson
b1fb3e1d54 Add render mode and early discard for fill canvas vao 2023-02-01 11:19:22 -08:00
Grant Sanderson
474a6c27e3 Counteract alpha scaling from fill frag 2023-01-28 15:00:15 -08:00
Grant Sanderson
144e512952 Use active camera config, not default 2023-01-28 12:19:49 -08:00
Grant Sanderson
60a27f52f1 Add depth sampling for fill 2023-01-28 10:36:41 -08:00
Grant Sanderson
71ef39ea5b Remove "poor man's anti-aliasing" for Fill and instead render a small border width for fill 2023-01-27 16:15:20 -08:00
Grant Sanderson
97e4c25453 Add comment 2023-01-27 08:29:41 -08:00
Grant Sanderson
1707958e0f Clean up fill shader a bit 2023-01-27 08:26:54 -08:00
Grant Sanderson
8f6c14ad5f Increase threshold for discarding fill fragments 2023-01-26 22:41:23 -08:00
Grant Sanderson
5803a00598 Use smaller fill_texture, adjusting winding-fill blending hack as is necessary 2023-01-26 20:14:22 -08:00
Grant Sanderson
37f0bf8c11 Fix winding fill blending
(Using somewhat of a hack)
2023-01-26 15:27:48 -08:00
Grant Sanderson
3f5df432ce Consider winding_fill alphas pre-multiplied 2023-01-26 12:17:21 -08:00
Grant Sanderson
a68bc1271b Have FillShaders all share the same texture used for intermediary rendering 2023-01-25 19:43:16 -08:00
Grant Sanderson
c94d8fd3b0 Move Texture handling and vao creation outside of Camera 2023-01-25 12:10:39 -08:00
Grant Sanderson
3299741359 Move program code to ShaderWrapper, away from Camera 2023-01-25 11:23:31 -08:00
Grant Sanderson
f15ac81131 Pull out helper functions from shader_wrapper.py 2023-01-16 14:18:35 -08:00
Grant Sanderson
72472c5836 Refactor in terms of a ShaderWrapper object 2020-07-22 18:21:42 -07:00
Grant Sanderson
2671817ae9 Refactor away from treating shader_info as a dictionary, and make it a proper type as ShaderWrapper. This also includes some cleanup in hos Camera renders 2020-06-29 18:17:18 -07:00
Grant Sanderson
2b3bd2bfce Use an index buffer for shaders to save memory 2020-06-29 11:05:09 -07:00
Grant Sanderson
279f66ceaf A little refactoring and performance improvement 2020-06-28 12:14:46 -07:00
Grant Sanderson
10c6bfe3ad Add refresh_shader_info_id insetead of having create_shader_info_id called all the time 2020-06-27 00:01:45 -07:00
Grant Sanderson
60e1c88eb4 Slight tweaks to how shader_info id is found and stored 2020-06-26 23:05:25 -07:00
Grant Sanderson
212cdbb4d2 Speed improvements. Camera saves vbo for static mobjects, data in shader_data_info is saved and concatenated in raw form 2020-06-26 19:29:34 -07:00
Grant Sanderson
5ce8d08e0f Go back to recomputing shader id 2020-06-17 17:10:35 -07:00
Grant Sanderson
1e6eef89ec Have shader_info remember its own id 2020-06-15 11:59:24 -07:00
Grant Sanderson
9d772496dd Removes the need to be able to recover shader_info from shader_id 2020-06-14 19:01:04 -07:00
Grant Sanderson
222b6d1220 Push depth test decision to the mobject level, as opposed to the camera 2020-06-14 17:41:47 -07:00
Grant Sanderson
bab809b9a6 Allow for passing shader uniforms from mobjects 2020-06-08 15:57:12 -07:00
Grant Sanderson
39230a805c Better handling of textures, now letting multiple get passed in to a textured surface 2020-06-08 15:06:22 -07:00
Grant Sanderson
9d4b16d03f Moved around where batching mobjects by shader type occurs, while also pulling out some of the shader_id helper functions 2020-02-17 12:14:40 -08:00