source:
data/branches/Shader_HS18/programs/Example/GLSL150/Example_TextureArrayPS.glsl
@
12091
Last change on this file since 12091 was 12083, checked in by wiesep, 6 years ago | |
---|---|
File size: 362 bytes |
Line | |
---|---|
1 | #version 150 |
2 | |
3 | uniform sampler2DArray TextureArrayTex; |
4 | in vec4 oUv; |
5 | out vec4 fragColour; |
6 | |
7 | void main(void) |
8 | { |
9 | vec4 texcoord; |
10 | texcoord = oUv; |
11 | texcoord.z = floor(texcoord.z); |
12 | vec4 c0 = texture(TextureArrayTex, texcoord.xyz); |
13 | texcoord.z += 1.0; |
14 | vec4 c1 = texture(TextureArrayTex, texcoord.xyz); |
15 | |
16 | fragColour = mix(c0, c1, fract(oUv.z)); |
17 | } |
Note: See TracBrowser
for help on using the repository browser.