yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
c8d3e066
main-tot
1#version 460 core 2 3#extension GL_EXT_descriptor_heap : enable 4#extension GL_EXT_nonuniform_qualifier : enable 5 6// Sampler array aliased to the sampler heap 7uniform sampler heapSampler [] ; 8 9// Different image arrays aliased to the image heap 10uniform texture2D heapTexture2D [] ; 11uniform texture3D heapTexture3D [] ; 12 13// Different buffer arrays aliased to the buffer heap 14buffer StorageBufferA { 15vec4 a ; 16} heapStorageBufferA [] ; 17buffer StorageBufferB { 18vec3 b ; 19} heapStorageBufferB [] ; 20uniform UniformBuffer { 21vec4 colorOffset ; 22} heapUniformBuffer [] ; 23 24layout ( location = 0 ) in vec2 uvs ; 25layout ( location = 1 ) flat in uint index ; 26 27layout ( location = 0 ) out vec4 fragColor ; 28 29void main () 30{ 31fragColor = texture ( sampler2D ( heapTexture2D [ 27 ] , heapSampler [ 0 ]) , uvs ) ; 32fragColor += heapUniformBuffer [ nonuniformEXT ( index )] . colorOffset ; 33heapStorageBufferA [ 1 ] . a = vec4 ( 1 , 2 , 3 , 4 ) ; 34fragColor . x += heapStorageBufferB [ nonuniformEXT ( index )] . b . x ; 35}