SPIRV-Cross/shaders-msl/vulkan/frag/basic.multiview.no-layered.nocompat.vk.frag
Chip Davis cab7335e64 MSL: Don't set the layer for multiview if the device doesn't support it.
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.
2020-09-01 19:30:28 -05:00

15 lines
318 B
GLSL

#version 310 es
#extension GL_EXT_multiview : require
precision mediump float;
layout(location = 0) in vec4 vColor;
layout(location = 1) in vec2 vTex[4];
layout(binding = 0) uniform sampler2D uTex;
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = vColor * texture(uTex, vTex[gl_ViewIndex]);
}