yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
2f21fcce
main
1#version 130 2 3uniform sampler1D texSampler1D ; 4uniform sampler2D texSampler2D ; 5uniform sampler3D texSampler3D ; 6uniform samplerCube texSamplerCube ; 7uniform sampler1DShadow shadowSampler1D ; 8uniform sampler2DShadow shadowSampler2D ; 9 10uniform float blend ; 11uniform vec2 scale ; 12uniform vec4 u ; 13 14varying vec2 t ; 15varying vec2 coords2D ; 16 17void main () 18{ 19float blendscale = 1.789 ; 20float bias = 2.0 ; 21float lod = 3.0 ; 22float proj = 2.0 ; 23float coords1D = 1.789 ; 24vec3 coords3D = vec3 (1.789 ,2.718 ,3.453 ); 25vec4 coords4D = vec4 (1.789 ,2.718 ,3.453 ,2.0 ); 26vec4 color = vec4 (0.0 ,0.0 ,0.0 ,0.0 ); 27 28color += texture1D (texSampler1D ,coords1D ); 29color += texture1D (texSampler1D ,coords1D ,bias ); 30color += texture1DProj (texSampler1D ,coords2D ); 31color += texture1DProj (texSampler1D ,coords4D ); 32color += texture1DProj (texSampler1D ,coords2D ,bias ); 33color += texture1DProj (texSampler1D ,coords4D ,bias ); 34 35color += texture2D (texSampler2D ,coords2D ); 36color += texture2D (texSampler2D ,coords2D ,bias ); 37color += texture2DProj (texSampler2D ,coords3D ); 38color += texture2DProj (texSampler2D ,coords4D ,bias ); 39 40color += texture3D (texSampler3D ,coords3D ); 41color += texture3D (texSampler3D ,coords3D ,bias ); 42color += texture3DProj (texSampler3D ,coords4D ); 43color += texture3DProj (texSampler3D ,coords4D ,bias ); 44 45color += textureCube (texSamplerCube ,coords3D ); 46color += textureCube (texSamplerCube ,coords3D ,bias ); 47 48color += shadow1D (shadowSampler1D ,coords3D ); 49color += shadow1D (shadowSampler1D ,coords3D ,bias ); 50color += shadow2D (shadowSampler2D ,coords3D ); 51color += shadow2D (shadowSampler2D ,coords3D ,bias ); 52color += shadow1DProj (shadowSampler1D ,coords4D ); 53color += shadow1DProj (shadowSampler1D ,coords4D ,bias ); 54color += shadow2DProj (shadowSampler2D ,coords4D ); 55color += shadow2DProj (shadowSampler2D ,coords4D ,bias ); 56 57ivec2 iCoords2D = ivec2 (0 ,5 ); 58int iLod = 1 ; 59 60color += texelFetch (texSampler2D ,iCoords2D ,iLod ); 61 62vec2 gradX = dFdx (coords2D ); 63vec2 gradY = dFdy (coords2D ); 64const ivec2 offset = ivec2 (3 ,-7 ); 65 66color += textureGrad (texSampler2D ,coords2D ,gradX ,gradY ); 67color += textureProjGrad (texSampler2D ,vec3 (coords2D ,proj ),gradX ,gradY ); 68color += textureGradOffset (texSampler2D ,coords2D ,gradX ,gradY ,offset ); 69color += textureProjGradOffset (texSampler2D ,coords3D ,gradX ,gradY ,offset ); 70color += textureGrad (shadowSampler2D ,vec3 (coords2D ,lod ),gradX ,gradY ); 71 72gl_FragColor = mix (color ,u ,blend * blendscale ); 73}