projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug invalid memory write
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
model_gate_lq.fs
diff --git
a/shaders/model_gate_lq.fs
b/shaders/model_gate_lq.fs
index c455126174f55432ea07ee9f4b13afb28d3358af..772efcb5187ebad3029973f5d7da46567195971f 100644
(file)
--- a/
shaders/model_gate_lq.fs
+++ b/
shaders/model_gate_lq.fs
@@
-3,6
+3,7
@@
out vec4 FragColor;
uniform float uTime;
uniform vec3 uCam;
uniform vec2 uInvRes;
uniform float uTime;
uniform vec3 uCam;
uniform vec2 uInvRes;
+uniform vec4 uColour;
in vec3 aNorm;
in vec2 aUv;
in vec3 aNorm;
in vec2 aUv;
@@
-11,7
+12,7
@@
in vec3 aCo;
void main()
{
vec2 ssuv = gl_FragCoord.xy;
void main()
{
vec2 ssuv = gl_FragCoord.xy;
- float opacity = 1.0-smoothstep(0.
4,1.0,aUv.y
);
+ float opacity = 1.0-smoothstep(0.
0,1.0,aUv.y+uColour.a
);
vec3 vDither = vec3( dot( vec2( 171.0, 231.0 ), ssuv) );
float dither = fract( vDither.g / 71.0 ) - 0.5;
vec3 vDither = vec3( dot( vec2( 171.0, 231.0 ), ssuv) );
float dither = fract( vDither.g / 71.0 ) - 0.5;
@@
-19,5
+20,5
@@
void main()
if( opacity+dither<0.5 )
discard;
if( opacity+dither<0.5 )
discard;
- FragColor =
vec4( 0.0, 1.0, 0.0, 1.0 )
;
+ FragColor =
uColour
;
}
}