mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Partition render groups based on shader type, fixed_in_frame status, depth_test and whether the mobject is changing
This commit is contained in:
parent
6eafdc63cc
commit
8adf2a6e07
1 changed files with 7 additions and 1 deletions
|
@ -393,7 +393,12 @@ class Scene(object):
|
||||||
self.render_groups = []
|
self.render_groups = []
|
||||||
batches = batch_by_property(
|
batches = batch_by_property(
|
||||||
self.mobjects,
|
self.mobjects,
|
||||||
lambda m: str(m.get_uniforms()) + str(m.apply_depth_test)
|
lambda m: "".join([
|
||||||
|
str(m.shader_dtype),
|
||||||
|
str(m.is_fixed_in_frame()),
|
||||||
|
str(m.depth_test),
|
||||||
|
str(m.is_changing()),
|
||||||
|
])
|
||||||
)
|
)
|
||||||
self.render_groups = [
|
self.render_groups = [
|
||||||
batch[0].get_group_class()(*batch)
|
batch[0].get_group_class()(*batch)
|
||||||
|
@ -643,6 +648,7 @@ class Scene(object):
|
||||||
else:
|
else:
|
||||||
self.update_mobjects(0)
|
self.update_mobjects(0)
|
||||||
|
|
||||||
|
@affects_mobject_list
|
||||||
def play(
|
def play(
|
||||||
self,
|
self,
|
||||||
*proto_animations: Animation | _AnimationBuilder,
|
*proto_animations: Animation | _AnimationBuilder,
|
||||||
|
|
Loading…
Add table
Reference in a new issue