yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
21369c82
main
1#version 450 core 2 3#extension GL_ARB_sparse_texture2 : enable 4#extension GL_AMD_texture_gather_bias_lod : enable 5 6uniform sampler2D s2D ; 7uniform sampler2DArray s2DArray ; 8uniform samplerCube sCube ; 9uniform samplerCubeArray sCubeArray ; 10 11in vec2 c2 ; 12in vec3 c3 ; 13in vec4 c4 ; 14 15in float lod ; 16in float bias ; 17 18out vec4 fragColor ; 19 20void main () 21{ 22vec4 texel = vec4 (0.0 ); 23vec4 result = vec4 (0.0 ); 24 25const ivec2 offsets [4 ]= {ivec2 (0 ,0 ),ivec2 (0 ,1 ),ivec2 (1 ,0 ),ivec2 (1 ,1 ) }; 26 27texel += textureGather (s2D ,c2 ,0 ,bias ); 28texel += textureGather (s2DArray ,c3 ,1 ,bias ); 29texel += textureGather (sCube ,c3 ,2 ,bias ); 30texel += textureGather (sCubeArray ,c4 ,3 ,bias ); 31 32texel += textureGatherOffset (s2D ,c2 ,offsets [0 ],0 ,bias ); 33texel += textureGatherOffset (s2DArray ,c3 ,offsets [1 ],1 ,bias ); 34 35texel += textureGatherOffsets (s2D ,c2 ,offsets ,0 ,bias ); 36texel += textureGatherOffsets (s2DArray ,c3 ,offsets ,1 ,bias ); 37 38sparseTextureGatherARB (s2D ,c2 ,result ,0 ,bias ); 39texel += result ; 40sparseTextureGatherARB (s2DArray ,c3 ,result ,1 ,bias ); 41texel += result ; 42sparseTextureGatherARB (sCube ,c3 ,result ,2 ,bias ); 43texel += result ; 44sparseTextureGatherARB (sCubeArray ,c4 ,result ,2 ,bias ); 45texel += result ; 46 47sparseTextureGatherOffsetARB (s2D ,c2 ,offsets [0 ],result ,0 ,bias ); 48texel += result ; 49sparseTextureGatherOffsetARB (s2DArray ,c3 ,offsets [1 ],result ,1 ,bias ); 50texel += result ; 51 52sparseTextureGatherOffsetsARB (s2D ,c2 ,offsets ,result ,0 ,bias ); 53texel += result ; 54sparseTextureGatherOffsetsARB (s2DArray ,c3 ,offsets ,result ,1 ,bias ); 55texel += result ; 56 57texel += textureGatherLodAMD (s2D ,c2 ,lod ); 58texel += textureGatherLodAMD (s2DArray ,c3 ,lod ,1 ); 59texel += textureGatherLodAMD (sCube ,c3 ,lod ,2 ); 60texel += textureGatherLodAMD (sCubeArray ,c4 ,lod ,3 ); 61 62texel += textureGatherLodOffsetAMD (s2D ,c2 ,lod ,offsets [0 ]); 63texel += textureGatherLodOffsetAMD (s2DArray ,c3 ,lod ,offsets [1 ],1 ); 64 65texel += textureGatherLodOffsetsAMD (s2D ,c2 ,lod ,offsets ); 66texel += textureGatherLodOffsetsAMD (s2DArray ,c3 ,lod ,offsets ,1 ); 67 68sparseTextureGatherLodAMD (s2D ,c2 ,lod ,result ); 69texel += result ; 70sparseTextureGatherLodAMD (s2DArray ,c3 ,lod ,result ,1 ); 71texel += result ; 72sparseTextureGatherLodAMD (sCube ,c3 ,lod ,result ,2 ); 73texel += result ; 74sparseTextureGatherLodAMD (sCubeArray ,c4 ,lod ,result ,2 ); 75texel += result ; 76 77sparseTextureGatherLodOffsetAMD (s2D ,c2 ,lod ,offsets [0 ],result ); 78texel += result ; 79sparseTextureGatherLodOffsetAMD (s2DArray ,c3 ,lod ,offsets [1 ],result ,1 ); 80texel += result ; 81 82sparseTextureGatherLodOffsetsAMD (s2D ,c2 ,lod ,offsets ,result ); 83texel += result ; 84sparseTextureGatherLodOffsetsAMD (s2DArray ,c3 ,lod ,offsets ,result ,1 ); 85texel += result ; 86 87fragColor = texel ; 88}