Changes

Jump to: navigation, search

GAM670/DPS905 Weekly Schedule 20121

763 bytes removed, 08:54, 17 February 2012
Fragment Shader
: vertexShader.hlsl - vertexShader()
<syntaxhighlight lang="cpp">
// TransformedVertex holds the transformed data for the vertex
//
struct TransformedVertex {
 
float4 position : POSITION; // position in homogeneous clip space
float2 texCoord : TEXCOORD; // texture coordinates
float3 worldPos : TEXCOORD1; // position in world space
float3 worldNor : TEXCOORD2; // lighting normal in world space
float3 toViewer : TEXCOORD3; // direction to viewer in world space
};
 
// Uniform Data (constant for the stream of vertices)
//
// Geometry
float4x4 viewProjection; // view * projection transformation
float4x4 world; // world transformation
float3 viewPoint; // camera viewpoint for specular calcs
// Lit Vertex
bool litVertex; // omit lighting calculations - already lit
 
// vertexShader receives a raw data for a vertex and transforms that data
//

Navigation menu