mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add ivec variants to multiview_uv for stereo rendering
This commit is contained in:
parent
0bcc0e92b3
commit
1066f01607
3 changed files with 30 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue