diff options
Diffstat (limited to 'model.cpp')
-rw-r--r-- | model.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -20,7 +20,9 @@ struct Mat_Cbuffer { float metalness; float roughness; float ao; - char pad[40]; + char pad2[8]; + float camera_pos[3]; + char pad[20]; }; void Material::use( @@ -316,6 +318,9 @@ void Model_Instance::update_cbuffers( mat.metalness = sm.metalness; mat.roughness = sm.roughness; mat.ao = sm.ao; + mat.camera_pos[0] = cam.position.x; + mat.camera_pos[1] = cam.position.y; + mat.camera_pos[2] = cam.position.z; } dev->unmap_buffer(mvp); dev->unmap_buffer(mat); |