Commit graph

76 commits

Author SHA1 Message Date
Grant Sanderson
0ac9ee1fbf Don't deepcopy ShaderWrapper 2024-08-20 10:15:53 -05:00
Grant Sanderson
e796a0c6d6 Remove stray TODO 2024-08-20 09:10:14 -05:00
Grant Sanderson
f12b143d16 Unify get_shader_wrapper_list, and and better subdivide render groups by ShaderWrapper ids 2024-08-20 08:53:51 -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
c064b11e2a Interleave base_point and unit_normal in the same array 2024-08-19 16:50:49 -05:00
Grant Sanderson
b7337f0781 Remove some ShaderWrapper methods which are no longer needed 2024-08-19 14:45:12 -05:00
Grant Sanderson
195264f079 Stop pretending to support non-winding fill in the fill shader.
Possibly, if we want to reintroduce it later on, it should have its own dedicated shader, and maybe a distinct Mobject type too
2024-08-19 14:37:11 -05:00
Grant Sanderson
3b5d63d2fa Add depth shader to handle winding fill depth test. 2024-08-19 14:09:07 -05:00
Grant Sanderson
4cb16dfc0b Don't apply depth test during winding fill 2024-08-19 11:28:58 -05:00
Grant Sanderson
4174f314b4 Reorganize, and ensure get_shader_wrapper_list works for general Groups 2024-08-19 09:17:58 -05:00
Grant Sanderson
f2bca0045f Add border width and backstroke 2024-08-19 08:18:45 -05:00
Grant Sanderson
24b160f9f9 Update VMobject shader wrapper
Use a combined VBO
Render with TRIANGLE_STRIP, and ignore every other
2024-08-19 08:05:32 -05:00
Grant Sanderson
f9b9cf69fd Update so that vbo is not recreated on each from, but is read into 2024-08-17 07:11:56 -05:00
Grant Sanderson
902a4f264e Add white space after assert statements 2024-08-16 12:15:55 -05:00
Grant Sanderson
88672a21ff Include texture id in shader wrapper id
This ensure that, among other things, ImageMobjects appearing in groups don't get lumped together in rendering.
2024-01-17 15:01:49 -06:00
Grant Sanderson
21d20541b5 Add texture_names_to_ids to ShaderWrapper 2023-06-10 09:25:44 -07:00
Grant Sanderson
7d1330fa68 Check if mobject_uniforms is None 2023-02-04 16:49:32 -08:00
Grant Sanderson
ac3db9b636 Add set_program_uniform function 2023-02-02 21:13:18 -08:00
Grant Sanderson
ee08c552bf Remove ShaderWrapper.get_program_id 2023-02-02 20:49:13 -08:00
Grant Sanderson
7f940fbee4 Change how ShaderWrapper uniforms are handled 2023-02-02 17:45:52 -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
0c9afb65d9 Small clean up to render calls 2023-02-01 11:19:40 -08:00
Grant Sanderson
2cbad30f45 Change VMobject rendering mode to TRIANGLES
And set indices appropriately when reading in to the ShaderWrapper
2023-01-31 11:45:53 -08:00
Grant Sanderson
7e00660e47 Whoops, re-instate pre_render 2023-01-30 15:16:08 -08:00
Grant Sanderson
da9610b9f9 Remove redundancy 2023-01-28 17:54:00 -08:00
Grant Sanderson
38abef8871 Fix ShaderWrapper.init_textures 2023-01-27 19:27:23 -08:00
Grant Sanderson
40ae481979 Marginally better vbo/ibo tracking 2023-01-27 10:01:37 -08:00
Grant Sanderson
1707958e0f Clean up fill shader a bit 2023-01-27 08:26:54 -08:00
Grant Sanderson
6388647860 Change to using glBlendFuncSeparate
To please type checkers
2023-01-26 22:51:14 -08:00
Grant Sanderson
7a59cc2f03 Use gl.MAX to blend alphas in fill 2023-01-26 22:40:29 -08:00
Grant Sanderson
0f89349bb8 Small clean up 2023-01-26 21:00:20 -08:00
Grant Sanderson
258bc2256a Provide a check that shader uniforms really need updating before setting value 2023-01-26 20:01:59 -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
7609b1db78 Set up by-hand anti-aliasing for FillShaderWrapper 2023-01-25 17:19:44 -08:00
Grant Sanderson
d2af6a5f4b Keep track of when Mobject data has changed, and used that to determine when ShaderWrapper generates new buffers 2023-01-25 16:43:47 -08:00
Grant Sanderson
4dfabc1c28 Make sure FillShaderWrapper works without a window 2023-01-25 14:20:36 -08:00
Grant Sanderson
424707d035 Move rendering more fully away from Camera to Mobject and ShaderWrapper 2023-01-25 14:13:56 -08:00
Grant Sanderson
2c737ed540 Move most of rendering logic to ShaderWrapper 2023-01-25 13:45:18 -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
10047773f7 Have ShaderWrapper track OpenGL context 2023-01-25 10:49:30 -08:00
Grant Sanderson
8c1e5f3b42 Change use_clip_plane to be a function 2023-01-25 10:31:05 -08:00
Grant Sanderson
e9c70dbfd9 Ensure vert_indices are always of type int 2023-01-24 16:58:47 -08:00
Grant Sanderson
72da9786a3 Use null array for vert indices in place of None 2023-01-24 15:53:43 -08:00
Grant Sanderson
87afdac6a4 Small clean up 2023-01-24 14:09:41 -08:00
Grant Sanderson
4774d2bc3b First pass at a winding-based fill approach 2023-01-24 13:29:34 -08:00
Grant Sanderson
f15ac81131 Pull out helper functions from shader_wrapper.py 2023-01-16 14:18:35 -08:00