Init
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
#include <config.cg>
|
||||
#include <globals.cg>
|
||||
|
||||
struct VertexOut
|
||||
{
|
||||
float4 screenSpacePosition : POSITION;
|
||||
half4 color : COLOR;
|
||||
};
|
||||
|
||||
VertexOut vmain(__in(float4, localSpacePosition, POSITION)
|
||||
__in_opt(half4, vertexColor, COLOR)
|
||||
__in_opt(float3, localSpaceNormal, NORMAL))
|
||||
{
|
||||
VertexOut vout;
|
||||
float4x4 vpm = mul(g_projMatrix, g_viewMatrix);
|
||||
vout.screenSpacePosition = mul(vpm, localSpacePosition);
|
||||
vout.screenSpacePosition.z -= 0.005; // hack to avoid z-fighting
|
||||
vout.color = vertexColor;
|
||||
return vout;
|
||||
}
|
||||
Reference in New Issue
Block a user