29 lines
763 B
Plaintext
29 lines
763 B
Plaintext
// Parameters passed from the vertex shader to the fragment shader.
|
|
struct FragmentParameters
|
|
{
|
|
float4 worldSpacePosition : TEXCOORD4;
|
|
float2 texcoord0 : TEXCOORD0;
|
|
half4 color : COLOR;
|
|
};
|
|
|
|
#include <globals.cg>
|
|
|
|
struct VertexOut
|
|
{
|
|
FragmentParameters params;
|
|
float4 screenSpacePosition : POSITION;
|
|
};
|
|
|
|
VertexOut vmain(__in(float4, localSpacePosition, POSITION)
|
|
__in_opt(half4, vertexColor, COLOR)
|
|
__in_opt(float4, texcoord0, TEXCOORD0))
|
|
{
|
|
VertexOut vout;
|
|
|
|
vout.screenSpacePosition = localSpacePosition + g_modelMatrix[0];
|
|
vout.params.worldSpacePosition = localSpacePosition;
|
|
vout.params.texcoord0 = texcoord0.xy;
|
|
vout.params.color = vertexColor;
|
|
return vout;
|
|
}
|