From 928eba3845d6017d133048cf04c1f816d87941b0 Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 29 Dec 2024 13:40:55 +1100 Subject: model hierarchy support --- intermediate/surface.glsl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'intermediate/surface.glsl') 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); } -- cgit v1.2.3-54-g00ecf