Files
wgpu/tests/out/quad.Fragment.glsl
Jim Blandy 4f442ff8cc Require binding interpolation to be resolved by the front end.
When validating IR, verify that all `Binding`s for vertex shader outputs and
fragment shader inputs, whether directly in the argument or result, or applied
to a struct member, has specified an interpolation and sampling, not `None`.
This ensures that front ends explicitly state their policies, rather than
coasting through on back ends' default behavior.

In practice, all our front ends have very similar defaults, so provide a utility
function on `Module` to apply these rules. Use this utility function in the
SPIR-V and WGSL front ends; GLSL seems to already fill in interpolation as
required.
2021-04-19 09:42:00 -04:00

25 lines
462 B
GLSL

#version 310 es
precision highp float;
struct VertexOutput {
vec2 uv;
vec4 position;
};
uniform highp sampler2D _group_0_binding_0;
smooth layout(location = 0) in vec2 _vs2fs_location0;
layout(location = 0) out vec4 _fs2p_location0;
void main() {
vec2 uv2 = _vs2fs_location0;
vec4 _expr4 = texture(_group_0_binding_0, vec2(uv2));
if((_expr4[3] == 0.0)) {
discard;
}
_fs2p_location0 = (_expr4[3] * _expr4);
return;
}