From 07a616b252ef62c2406c6bf1f18c84f7dd609a24 Mon Sep 17 00:00:00 2001 From: lanariel Date: Fri, 29 Nov 2013 10:44:04 +0100 Subject: [PATCH] Correct VertexShader --- .../HLSL/SimpleDebug/DebugCameraVertex.hlsl | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/Code/OysterGraphics/Shader/HLSL/SimpleDebug/DebugCameraVertex.hlsl b/Code/OysterGraphics/Shader/HLSL/SimpleDebug/DebugCameraVertex.hlsl index 1b015976..0d87411e 100644 --- a/Code/OysterGraphics/Shader/HLSL/SimpleDebug/DebugCameraVertex.hlsl +++ b/Code/OysterGraphics/Shader/HLSL/SimpleDebug/DebugCameraVertex.hlsl @@ -1,28 +1,13 @@ #include "Debug.hlsl" -{ - matrix View; - float4x4 Projection; -} -cbuffer PerModel : register(b1) -{ - matrix World; -} -struct VertexIn +VertexOut main( VertexIn input ) { - float3 pos : POSITION; - float2 UV : TEXCOORD; - float3 normal : NORMAL; -}; - -float4 main( VertexIn input ) : SV_POSITION -{ - float4 postTransform = mul( World, float4(input.pos,1) ); - //float4 postTransform = float4(input.pos,1); - //return postTransform; - //return mul(View, float4(input.pos,1)); + VertexOut outp; + outp.Wpos = mul( World, float4(input.pos,1) ); matrix VP = mul(Projection, View); - //matrix WVP = mul(World, VP); - return mul(VP, postTransform ); - + outp.Pos = mul(VP, outp.Wpos ); + outp.UV = input.UV; + outp.Normal = input.normal; + + return outp; } \ No newline at end of file