VertexToPixel PositionsVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float4 inColor: COLOR)
{
VertexToPixel Output = (VertexToPixel)0;
float4x4 preViewProjection = mul (xView, xProjection);
float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
Output.Position = mul(inPos, preWorldViewProjection);
Output.Color = 1;
Output.Color.rgb = Output.Position.z;
return Output;
}
PixelToFrame PositionsPS(VertexToPixel PSIn)
{
PixelToFrame Output = (PixelToFrame)0;
Output.Color = PSIn.Color/25;
return Output;
}
My cubes have a dimension of 0.9x0.9x0.9 at positions (0,0,-10), (0,0,-9) ... (0,0,10).
My camera is at (0,10,-20) looking at (0,0,0).

Find content
Not Telling