Commit graph

61 commits

Author SHA1 Message Date
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
Grant Sanderson
f5480d02ff Tidy up ShaderWrapper.read_in 2023-01-16 13:26:34 -08:00
Grant Sanderson
3a09acd28c Update type hint for ShaderWrapper.uniforms 2023-01-16 11:50:48 -08:00
Grant Sanderson
74b42a6eb5 Small renaming 2023-01-16 08:59:50 -08:00
Grant Sanderson
ba9f61b50b Have ShaderWrapper read in data rather than other shader wrappers 2023-01-15 20:27:19 -08:00
Grant Sanderson
702bb2776c Remove (no-longer needed) filename_to_code_map 2023-01-14 09:41:32 -08:00
Grant Sanderson
dae51abc17 Allow for a clip plane with Surface 2023-01-13 21:42:34 -08:00
Grant Sanderson
dddaef0e6c Add lru_cache for get_shader_code_from_file 2022-12-29 20:51:11 -08:00
Grant Sanderson
a54a81744d Have ShaderWrapper.combine_with do nothing for empty arg list 2022-12-29 12:04:35 -08:00
Grant Sanderson
05f02f5154 Fix ShaderWrapper.combine_with 2022-12-28 13:38:27 -08:00
Grant Sanderson
e54e04a5ce Add ShaderWrapper.read_in
This will function similarly to combine_with, but without necessarily having to allocate new memory
2022-12-27 21:39:20 -08:00
Grant Sanderson
33a92d3ab3 Small cleanup in camera.py 2022-12-27 14:53:55 -08:00
Grant Sanderson
66f695a1ed Ensure ShaderWrapper.copy copies uniforms which are numpy arrays 2022-04-24 13:23:30 -07:00
Grant Sanderson
3ae0a4e81b Add equality for ShaderWrapper 2022-04-23 18:51:03 -07:00
YishiMichael
9ef9961d0e
Sort imports 2022-04-12 19:19:59 +08:00
TonyCrane
91ffdeb2d4
chore: add type hints to manimlib.shader_wrapper 2022-02-15 14:49:02 +08:00