mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
Push constants need to be configured by the consumer which must pass the bind target of the constant buffer used for the push constants.
24 lines
409 B
GLSL
24 lines
409 B
GLSL
#version 320 es
|
|
|
|
precision highp float;
|
|
precision highp int;
|
|
|
|
struct PushConstants {
|
|
float multiplier;
|
|
};
|
|
struct FragmentIn {
|
|
vec4 color;
|
|
};
|
|
uniform PushConstants pc;
|
|
|
|
layout(location = 0) in vec2 _p2vs_location0;
|
|
|
|
void main() {
|
|
vec2 pos = _p2vs_location0;
|
|
uint vi = uint(gl_VertexID);
|
|
float _e5 = pc.multiplier;
|
|
gl_Position = vec4(((float(vi) * _e5) * pos), 0.0, 1.0);
|
|
return;
|
|
}
|
|
|