I'm moving vertices in a very simple shader but for some reason the normals dont move with the vertices and I'm left with an odd effect. Any ideas what is causing this? Vertex Shader
#include "shaders/common/torque.hlsl"
struct Appdata
{
float3 position : POSITION;
float tangentW : TEXCOORD3;
float3 normal : NORMAL;
float3 T : TANGENT;
float2 texCoord : TEXCOORD0;
};
struct Conn
{
float4 hpos : SV_Position;
float2 texCoord : TEXCOORD0;
};
Conn main( Appdata In,
uniform float4x4 modelview : register(C0) )
{
Conn Out;
In.position.z += 20;
Out.hpos = mul(modelview, float4(In.position, 1.0));
Out.texCoord = In.texCoord;
return Out;
}
Pixel Shader
#include "shaders/common/torque.hlsl"
struct Conn
{
float4 hpos : SV_Position;
float2 texCoord : TEXCOORD0;
};
struct Fragout
{
float4 col : SV_Target0;
};
Fragout main(Conn IN)
{
Fragout OUT;
OUT.col = (255,255,255,1);
return OUT;
}
What it looks like in game