mirror of
https://github.com/3b1b/manim.git
synced 2025-07-29 21:12:35 +08:00
Allow for a clip plane with Surface
This commit is contained in:
@ -7,6 +7,7 @@ uniform vec3 camera_position;
|
||||
uniform float reflectiveness;
|
||||
uniform float gloss;
|
||||
uniform float shadow;
|
||||
uniform vec4 clip_plane;
|
||||
|
||||
in vec3 point;
|
||||
in vec3 du_point;
|
||||
@ -28,6 +29,10 @@ void main(){
|
||||
v_color = color;
|
||||
gl_Position = get_gl_Position(xyz_coords);
|
||||
|
||||
if(clip_plane.xyz != vec3(0.0, 0.0, 0.0)){
|
||||
gl_ClipDistance[0] = dot(vec4(point, 1.0), clip_plane);
|
||||
}
|
||||
|
||||
v_color = finalize_color(
|
||||
color,
|
||||
xyz_coords,
|
||||
|
Reference in New Issue
Block a user