Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Example/GLSLES/Example_TextureArrayPS.glsles @ 12091

Last change on this file since 12091 was 12091, checked in by wiesep, 5 years ago

Updated programs and adjusted Material to work with GLSL>150

File size: 402 bytes
Line 
1#version 300 es
2
3precision mediump int;
4precision mediump float;
5
6uniform lowp sampler2DArray TextureArrayTex;
7in vec4 oUv;
8out vec4 fragColour;
9
10void main(void)
11{
12        vec4 texcoord;
13        texcoord = oUv;
14        texcoord.z = floor(texcoord.z);
15    vec4 c0 = texture(TextureArrayTex, texcoord.xyz);
16        texcoord.z += 1.0;
17    vec4 c1 = texture(TextureArrayTex, texcoord.xyz);
18
19        fragColour = mix(c0, c1, fract(oUv.z));
20}
Note: See TracBrowser for help on using the repository browser.