mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
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.
22 lines
437 B
GLSL
22 lines
437 B
GLSL
#version 310 es
|
|
|
|
precision highp float;
|
|
|
|
struct VertexOutput {
|
|
vec4 position;
|
|
vec3 uv;
|
|
};
|
|
|
|
uniform highp samplerCube _group_0_binding_1;
|
|
|
|
smooth layout(location = 0) in vec3 _vs2fs_location0;
|
|
layout(location = 0) out vec4 _fs2p_location0;
|
|
|
|
void main() {
|
|
VertexOutput in1 = VertexOutput(gl_FragCoord, _vs2fs_location0);
|
|
vec4 _expr5 = texture(_group_0_binding_1, vec3(in1.uv));
|
|
_fs2p_location0 = _expr5;
|
|
return;
|
|
}
|
|
|