mirror of
https://git.stillkill.net/MinecraftLeak/Narration-NoGeneratedLevel-20170216.git
synced 2026-10-22 21:22:18 +01:00
Initial commit
This commit is contained in:
commit
bd6318027f
4937 files changed
+194287
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#include "ShaderConstants.fxh"
|
||||
|
||||
struct VS_Input
|
||||
{
|
||||
float3 position : POSITION;
|
||||
float2 uv : TEXCOORD_0;
|
||||
#ifdef INSTANCEDSTEREO
|
||||
uint instanceID : SV_InstanceID;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct PS_Input
|
||||
{
|
||||
float4 position : SV_Position;
|
||||
float2 uv : TEXCOORD_0;
|
||||
#ifdef INSTANCEDSTEREO
|
||||
uint instanceID : SV_InstanceID;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
void main( in VS_Input VSInput, out PS_Input PSInput )
|
||||
{
|
||||
PSInput.uv = VSInput.uv;
|
||||
#ifdef INSTANCEDSTEREO
|
||||
int i = VSInput.instanceID;
|
||||
float4 pos = mul(WORLDVIEW_STEREO[i], float4(VSInput.position, 1));
|
||||
PSInput.position = mul(PROJ_STEREO[i], pos);
|
||||
PSInput.instanceID = i;
|
||||
#else
|
||||
float4 pos = mul(WORLDVIEW, float4(VSInput.position, 1));
|
||||
PSInput.position = mul(PROJ, pos);
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user