mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Make projection shaders compatible with streamlines (#2160)
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
This commit is contained in:
parent
9bf45c7985
commit
a2fac4b9f0
1 changed files with 8 additions and 5 deletions
|
|
@ -210,11 +210,14 @@ def render_mobject_strokes_with_matrix(renderer, model_matrix, mobjects):
|
|||
end_offset = write_offset + submob.points.shape[0]
|
||||
|
||||
points[write_offset:end_offset] = submob.points
|
||||
colors[write_offset:end_offset] = np.repeat(
|
||||
submob.stroke_rgba,
|
||||
submob.points.shape[0],
|
||||
axis=0,
|
||||
)
|
||||
if submob.stroke_rgba.shape[0] == points[write_offset:end_offset].shape[0]:
|
||||
colors[write_offset:end_offset] = submob.stroke_rgba
|
||||
else:
|
||||
colors[write_offset:end_offset] = np.repeat(
|
||||
submob.stroke_rgba,
|
||||
submob.points.shape[0],
|
||||
axis=0,
|
||||
)
|
||||
widths[write_offset:end_offset] = np.repeat(
|
||||
submob.stroke_width,
|
||||
submob.points.shape[0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue