diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl index 3e52e43beae..10228a1e985 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl @@ -1,6 +1,5 @@ uniform mat4 ViewProjectionMatrix; -uniform mat4 ModelMatrix; /* ---- Instantiated Attrs ---- */ in vec3 pos; @@ -20,10 +19,10 @@ void main() { finalColor = color; - vec4 pos_4d = vec4(pos * size, 1.0); - gl_Position = ViewProjectionMatrix * InstanceModelMatrix * pos_4d; + vec4 wPos = InstanceModelMatrix * vec4(pos * size, 1.0); + gl_Position = ViewProjectionMatrix * wPos; #ifdef USE_WORLD_CLIP_PLANES - world_clip_planes_calc_clip_distance((ModelMatrix * InstanceModelMatrix * pos_4d).xyz); + world_clip_planes_calc_clip_distance(wPos.xyz); #endif } |