mirror of
https://git.stillkill.net/MinecraftLeak/MinecraftLegends.git
synced 2026-10-22 13:22:20 +01:00
32 lines
665 B
HLSL
32 lines
665 B
HLSL
#include "ShaderConstants.fxh"
|
|
|
|
struct VS_Input
|
|
{
|
|
float3 position : POSITION;
|
|
#ifdef INSTANCEDSTEREO
|
|
uint instanceID : SV_InstanceID;
|
|
#endif
|
|
};
|
|
|
|
|
|
struct PS_Input
|
|
{
|
|
float4 position : SV_Position;
|
|
float4 color : COLOR;
|
|
#ifdef INSTANCEDSTEREO
|
|
uint instanceID : SV_InstanceID;
|
|
#endif
|
|
};
|
|
|
|
|
|
void main( in VS_Input VSInput, out PS_Input PSInput )
|
|
{
|
|
PSInput.color = CURRENT_COLOR;
|
|
#ifdef INSTANCEDSTEREO
|
|
int i = VSInput.instanceID;
|
|
PSInput.position = mul( WORLDVIEWPROJ_STEREO[i], float4( VSInput.position, 1 ) );
|
|
PSInput.instanceID = i;
|
|
#else
|
|
PSInput.position = mul(WORLDVIEWPROJ, float4(VSInput.position, 1));
|
|
#endif
|
|
} |