fix shader: resolvedUrl path, vec4 for std140 alignment, color type
This commit is contained in:
parent
2e1789ba7d
commit
9804ed2287
2 changed files with 9 additions and 9 deletions
|
|
@ -10,9 +10,9 @@ layout(std140, binding = 0) uniform buf {
|
|||
vec2 uResolution;
|
||||
float uSize;
|
||||
float uWavePhase;
|
||||
vec3 uC0;
|
||||
vec3 uC1;
|
||||
vec3 uC2;
|
||||
vec4 uC0;
|
||||
vec4 uC1;
|
||||
vec4 uC2;
|
||||
|
||||
vec4 uSpinners0;
|
||||
vec4 uSpinners1;
|
||||
|
|
@ -84,8 +84,8 @@ void main() {
|
|||
// Gradient color
|
||||
float fx = clamp(center.x / uResolution.x, 0.0, 1.0);
|
||||
vec3 rgb = fx < 0.5
|
||||
? mix(uC0, uC1, fx * 2.0)
|
||||
: mix(uC1, uC2, (fx - 0.5) * 2.0);
|
||||
? mix(uC0.rgb, uC1.rgb, fx * 2.0)
|
||||
: mix(uC1.rgb, uC2.rgb, (fx - 0.5) * 2.0);
|
||||
|
||||
// Alpha from distance to center
|
||||
float fy = clamp(center.y / uResolution.y, 0.0, 1.0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue