summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/shaders
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2024-01-25 16:27:10 +0100
committerYuri Sizov <yuris@humnom.net>2024-01-25 16:27:10 +0100
commit1b83e8ae8132a9197719c10b8824767d8a26a214 (patch)
treec8c254e98d4e51217feb177a00952e45621716ad /drivers/gles3/shaders
parent1018706c87e43370fb1e7599024c1fdf00411638 (diff)
parent1066f01607468a002d62bce989dca73ead3544eb (diff)
downloadredot-engine-1b83e8ae8132a9197719c10b8824767d8a26a214.tar.gz
Merge pull request #87460 from BastiaanOlij/stereo_ivec
Add ivec variants to multiview_uv for stereo rendering
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r--drivers/gles3/shaders/scene.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index e95d684763..6e28228370 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -867,12 +867,18 @@ uniform highp sampler2DArray color_buffer; // texunit:-5
vec3 multiview_uv(vec2 uv) {
return vec3(uv, ViewIndex);
}
+ivec3 multiview_uv(ivec2 uv) {
+ return ivec3(uv, int(ViewIndex));
+}
#else
uniform highp sampler2D depth_buffer; // texunit:-6
uniform highp sampler2D color_buffer; // texunit:-5
vec2 multiview_uv(vec2 uv) {
return uv;
}
+ivec2 multiview_uv(ivec2 uv) {
+ return uv;
+}
#endif
uniform highp mat4 world_transform;