40 lines
846 B
GLSL
40 lines
846 B
GLSL
cbuffer cbuf : register(b3)
|
|
{
|
|
float4 cbuf_a : packoffset(c0);
|
|
};
|
|
cbuffer registers
|
|
{
|
|
float4 registers_a : packoffset(c0);
|
|
};
|
|
Texture2D<float4> uSampledImage : register(t4);
|
|
SamplerState _uSampledImage_sampler : register(s4);
|
|
Texture2D<float4> uTexture : register(t5);
|
|
SamplerState uSampler : register(s6);
|
|
|
|
static float2 vTex;
|
|
static float4 FragColor;
|
|
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
float2 vTex : TEXCOORD0;
|
|
};
|
|
|
|
struct SPIRV_Cross_Output
|
|
{
|
|
float4 FragColor : SV_Target0;
|
|
};
|
|
|
|
void frag_main()
|
|
{
|
|
FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_a);
|
|
}
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
vTex = stage_input.vTex;
|
|
frag_main();
|
|
SPIRV_Cross_Output stage_output;
|
|
stage_output.FragColor = FragColor;
|
|
return stage_output;
|
|
}
|