| 1 |
#version 440 |
| 2 |
|
| 3 |
layout(location = 0) in vec2 v_texcoord; |
| 4 |
|
| 5 |
layout(location = 0) out vec4 fragColor; |
| 6 |
|
| 7 |
layout(binding = 4) uniform sampler2D tex1; |
| 8 |
layout(binding = 8) uniform sampler2D shadowMaps[4]; // array of textures |
| 9 |
layout(binding = 9) uniform samplerCube shadowCubes[4]; // array of cubemap textures |
| 10 |
layout(binding = 10) uniform sampler2DArray texArr; // texture array |
| 11 |
|
| 12 |
void main() |
| 13 |
{ |
| 14 |
fragColor = texture(tex1, v_texcoord) * texture(texArr, vec3(v_texcoord, 0.0)) |
| 15 |
* texture(shadowMaps[0], v_texcoord) |
| 16 |
* texture(shadowMaps[1], v_texcoord) |
| 17 |
* texture(shadowMaps[2], v_texcoord) |
| 18 |
* texture(shadowMaps[3], v_texcoord) |
| 19 |
* texture(shadowCubes[0], vec3(v_texcoord, 0.0)) |
| 20 |
* texture(shadowCubes[1], vec3(v_texcoord, 0.0)) |
| 21 |
* texture(shadowCubes[2], vec3(v_texcoord, 0.0)) |
| 22 |
* texture(shadowCubes[3], vec3(v_texcoord, 0.0)); |
| 23 |
} |