diff options
Diffstat (limited to 'source/blender/draw/intern/shaders/common_subdiv_lib.glsl')
-rw-r--r-- | source/blender/draw/intern/shaders/common_subdiv_lib.glsl | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/draw/intern/shaders/common_subdiv_lib.glsl b/source/blender/draw/intern/shaders/common_subdiv_lib.glsl index 55e4ac20271..4183b4a1cd3 100644 --- a/source/blender/draw/intern/shaders/common_subdiv_lib.glsl +++ b/source/blender/draw/intern/shaders/common_subdiv_lib.glsl @@ -36,6 +36,10 @@ layout(std140) uniform shader_data /* Total number of elements to process. */ uint total_dispatch_size; + + bool is_edit_mode; + + bool use_hide; }; uint get_global_invocation_index() @@ -139,20 +143,20 @@ void set_vertex_pos(inout PosNorLoop vertex_data, vec3 pos) vertex_data.z = pos.z; } -void set_vertex_nor(inout PosNorLoop vertex_data, vec3 nor, uint flag) +/* Set the vertex normal but preserve the existing flag. This is for when we compute manually the + * vertex normals when we cannot use the limit surface, in which case the flag and the normal are + * set by two separate compute pass. */ +void set_vertex_nor(inout PosNorLoop vertex_data, vec3 nor) { vertex_data.nx = nor.x; vertex_data.ny = nor.y; vertex_data.nz = nor.z; - vertex_data.flag = float(flag); } -/* Set the vertex normal but preserve the existing flag. This is for when we compute manually the - * vertex normals when we cannot use the limit surface, in which case the flag and the normal are - * set by two separate compute pass. */ -void set_vertex_nor(inout PosNorLoop vertex_data, vec3 nor) +void set_vertex_nor(inout PosNorLoop vertex_data, vec3 nor, float flag) { - set_vertex_nor(vertex_data, nor, 0); + set_vertex_nor(vertex_data, nor); + vertex_data.flag = flag; } void add_newell_cross_v3_v3v3(inout vec3 n, vec3 v_prev, vec3 v_curr) |