Copy effect works on texture 2d arrays
-uniform sampler2D colorMap;
-uniform sampler2D depthMap;
+uniform sampler2DArray colorMap;
+uniform sampler2DArray depthMap;
in vec2 uv;
@@ -7,6 +7,6 @@ layout (location = 0) out vec4 color;
void main()
{
- color = vec4(texture(colorMap, uv).xyz, 1.);
- gl_FragDepth = texture(depthMap, uv).r;
+ color = vec4(texture(colorMap, vec3(uv, 0)).xyz, 1.);
+ gl_FragDepth = texture(depthMap, vec3(uv, 0)).r;
}
