Open main menu

CDOT Wiki β

Changes

GAM670/DPS905 Weekly Schedule 20121

94 bytes added, 09:41, 9 March 2012
This Week
FS_Skybox skyboxVertexShader(float3 pos : POSITION) {
FS_Skybox output = (FS_Skybox) 0;
output.pos = mul(float4(pos, 0), world); // Note the 0, this so the skybox rotates, but without perspectivetranslation output.pos = mul(output.pos, viewProjection).xyww; // The z coordinate is replaced by w, so that the point is always projected onto the far clipping plane.at infinity output.tex = pos.xzy; // Note that y and z are switched to match the texture coordinate system
return output;
}
AlphaBlendEnable = false;
ZENABLE = true;
ZWRITEENABLE = false; // By not storing the skybox's z-buffer value, it enables objects behind the skybox to be drawn, giving a realist look (e.g. a an airplane in the distance)
CullMode = None;
VertexShader = compile vs_3_0 skyboxVertexShader();
1
edit