mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-03 00:28:28 +00:00
46 lines
903 B
GLSL
46 lines
903 B
GLSL
Texture2D txDiffuseA : register( t0 );
|
|
Texture2D txDiffuseB : register( t1 );
|
|
|
|
SamplerState samLinearA : register( s0 );
|
|
SamplerState samLinearB : register( s1 );
|
|
|
|
cbuffer cbNeverChanges : register( b0 )
|
|
{
|
|
matrix View;
|
|
};
|
|
|
|
cbuffer cbChangeOnResize : register( b1 )
|
|
{
|
|
matrix Projection;
|
|
};
|
|
|
|
cbuffer cbChangesEveryFrame : register( b2 )
|
|
{
|
|
matrix World;
|
|
float4 vMeshColor;
|
|
};
|
|
|
|
|
|
struct VS_INPUT
|
|
{
|
|
float4 Pos : POSITION;
|
|
float2 Tex : TEXCOORD0;
|
|
};
|
|
|
|
struct PS_INPUT
|
|
{
|
|
float4 Pos : SV_POSITION;
|
|
float2 Tex : TEXCOORD0;
|
|
};
|
|
|
|
|
|
float4 main( PS_INPUT input) : SV_Target
|
|
{
|
|
PS_INPUT output = (PS_INPUT)0;
|
|
output.Pos = mul( input.Pos, World );
|
|
output.Pos = mul( output.Pos, View );
|
|
output.Pos = mul( output.Pos, Projection );
|
|
output.Tex = input.Tex;
|
|
return txDiffuseA.Sample( samLinearA, output.Tex ) * vMeshColor;
|
|
}
|