summaryrefslogtreecommitdiff
path: root/engine/res/default_shader.slang
diff options
context:
space:
mode:
Diffstat (limited to 'engine/res/default_shader.slang')
-rw-r--r--engine/res/default_shader.slang15
1 files changed, 3 insertions, 12 deletions
diff --git a/engine/res/default_shader.slang b/engine/res/default_shader.slang
index 04e897e..e42b83a 100644
--- a/engine/res/default_shader.slang
+++ b/engine/res/default_shader.slang
@@ -232,20 +232,11 @@ VertexStageOutput vertex_main(Vertex vertex: VERTEX)
{
VertexStageOutput stage_output;
- // TODO: Investigate why mul arguments need to be ordered this way.
- // The mul arguments are reordered in the GLSL output
+ float4x4 proj_view = mul(model_3d.projection, model_3d.view);
- // float4x4 proj_view = mul(model_3d.projection, model_3d.view);
- float4x4 proj_view = mul(model_3d.view, model_3d.projection);
+ float4x4 proj_view_model = mul(proj_view, model_3d.model);
- // float4x4 proj_view_model =
- // mul(proj_view, model_3d.model);
-
- float4x4 proj_view_model = mul(model_3d.model, proj_view);
-
- // stage_output.sv_position = mul(proj_view_model, float4(vertex.pos, 1.0));
-
- stage_output.sv_position = mul(float4(vertex.pos, 1.0), proj_view_model);
+ stage_output.sv_position = mul(proj_view_model, float4(vertex.pos, 1.0));
float4 vertex_pos = float4(vertex.pos, 1.0);