glslang/Test/hlsl.multiDescriptorSet.frag

46 lines
903 B
GLSL
Raw Normal View History

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;
}