mirror of
https://github.com/libretro/RetroArch
synced 2025-03-04 16:13:50 +00:00
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl 63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330. 9f3bebe3d0 Merge pull request #1075 from lifpan/master b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter. 1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout 28454facbb MSL: Handle packed matrices. ea5c0ed82f MSL: Fix alignment of packed types. 44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066 25c74b324e Forget loop variable enables after emitting block chain. 6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053 f6f849397e MSL: Re-roll array expressions in initializers. e5fa7edfd6 MSL: Support scalar block layout. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
45 lines
1.2 KiB
GLSL
45 lines
1.2 KiB
GLSL
Texture2D<float4> uCombined[4] : register(t0);
|
|
SamplerState _uCombined_sampler[4] : register(s0);
|
|
Texture2D<float4> uTex[4] : register(t4);
|
|
SamplerState uSampler[4] : register(s8);
|
|
RWTexture2D<float4> uImage[8] : register(u12);
|
|
|
|
static float4 gl_FragCoord;
|
|
static float2 vTex;
|
|
static int vIndex;
|
|
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
float2 vTex : TEXCOORD0;
|
|
nointerpolation int vIndex : TEXCOORD1;
|
|
float4 gl_FragCoord : SV_Position;
|
|
};
|
|
|
|
float4 sample_in_function(Texture2D<float4> samp, SamplerState _samp_sampler)
|
|
{
|
|
return samp.Sample(_samp_sampler, vTex);
|
|
}
|
|
|
|
float4 sample_in_function2(Texture2D<float4> tex, SamplerState samp)
|
|
{
|
|
return tex.Sample(samp, vTex);
|
|
}
|
|
|
|
void frag_main()
|
|
{
|
|
float4 color = uCombined[vIndex].Sample(_uCombined_sampler[vIndex], vTex);
|
|
color += uTex[vIndex].Sample(uSampler[vIndex], vTex);
|
|
int _72 = vIndex + 1;
|
|
color += sample_in_function(uCombined[_72], _uCombined_sampler[_72]);
|
|
color += sample_in_function2(uTex[vIndex + 1], uSampler[vIndex + 1]);
|
|
uImage[vIndex][int2(gl_FragCoord.xy)] = color;
|
|
}
|
|
|
|
void main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
gl_FragCoord = stage_input.gl_FragCoord;
|
|
vTex = stage_input.vTex;
|
|
vIndex = stage_input.vIndex;
|
|
frag_main();
|
|
}
|