diff options
author | quou <quou@disroot.org> | 2024-12-29 13:40:55 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-12-29 13:41:56 +1100 |
commit | 928eba3845d6017d133048cf04c1f816d87941b0 (patch) | |
tree | 50f8c52b6f6eb0adbde2666c50ff10dd3920616a /intermediate/surface.glsl | |
parent | 7383cfcbe8ade4dce057608e971e8cb7d4b1feb7 (diff) |
model hierarchy support
Diffstat (limited to 'intermediate/surface.glsl')
-rw-r--r-- | intermediate/surface.glsl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/intermediate/surface.glsl b/intermediate/surface.glsl index 681ec3f..18c13a3 100644 --- a/intermediate/surface.glsl +++ b/intermediate/surface.glsl @@ -25,17 +25,17 @@ name: normal type: vec3 [struct] -name: Config +name: MVP [variable] -name: transform +name: model type: mat4 [variable] -name: projection +name: view_projection type: mat4 [cbuffer] -name: config_buffer -type: Config +name: c_mvp +type: MVP stage: vertex [target] @@ -48,10 +48,10 @@ type: vec4 void main() { interpolator.uv = uv; - interpolator.normal = mat3(config_buffer.transform) * normal; + interpolator.normal = mat3(c_mvp.model) * normal; gl_Position = - config_buffer.projection * - config_buffer.transform * + c_mvp.view_projection * + c_mvp.model * vec4(position, 1.0); } |