cab7335e64
Some older iOS devices don't support layered rendering. In that case, don't set `[[render_target_array_index]]`, because the compiler will reject the shader in that case. The client will then have to unroll the render pass manually.
15 lines
217 B
GLSL
15 lines
217 B
GLSL
#version 310 es
|
|
#extension GL_EXT_multiview : require
|
|
|
|
layout(std140, binding = 0) uniform MVPs
|
|
{
|
|
mat4 MVP[2];
|
|
};
|
|
|
|
layout(location = 0) in vec4 Position;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = MVP[gl_ViewIndex] * Position;
|
|
}
|