]> git.tdb.fi Git - libs/gl.git/commitdiff
Store object transform in a push constant block
authorMikko Rasa <tdb@tdb.fi>
Mon, 8 Nov 2021 16:19:12 +0000 (18:19 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 8 Nov 2021 16:19:35 +0000 (18:19 +0200)
shaderlib/msp_interface.glsl

index 724538ffb95a84e6cbf69775b2c0e6f0664bc428..3ad27c43351aff10ad3ad9a8bee164098563b06e 100644 (file)
@@ -6,8 +6,11 @@ struct LightSourceParameters
        vec3 attenuation;
 };
 
-uniform mat4 world_obj_matrix;
-uniform mat3 world_obj_normal_matrix;
+layout(push_constant) uniform ObjectTransform
+{
+       mat4 world_obj_matrix;
+       mat3 world_obj_normal_matrix;
+};
 uniform CameraTransform
 {
        mat4 eye_world_matrix;