¡struct VertexInput {
¡ float4 position : POSITION;
¡ float3 normal : NORMAL;
¡};
¡
¡struct VertexOutput {
¡ float4 position : POSITION;
¡ float3 color : COLOR0;
¡};
¡
¡VertexOutput
Normal(const VertexInput input,
¡ const
uniform float4x4 ModelViewProjMatrix) {
¡
¡ VertexOutput output;
¡
¡ output.position = mul(ModelViewProjMatrix,
input.position);
¡ output.color = (input.normal+1)/2;
¡ return output;
¡}