Remove unneeded flat out
We can share the same uniform name, esp flat out is not working for my adreno 306 in android 5.0
This commit is contained in:
parent
e3483fccbe
commit
a2052b77b9
@ -1,16 +1,16 @@
|
|||||||
uniform sampler2D tex;
|
uniform sampler2D tex;
|
||||||
uniform sampler2D dtex;
|
uniform sampler2D dtex;
|
||||||
|
uniform float billboard;
|
||||||
|
|
||||||
in vec2 tc;
|
in vec2 tc;
|
||||||
in vec4 pc;
|
in vec4 pc;
|
||||||
flat in float billboard_mix;
|
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
#stk_include "utils/getPosFromUVDepth.frag"
|
#stk_include "utils/getPosFromUVDepth.frag"
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
float billboard_alpha = mix(1.0, texture(tex, tc).a, billboard_mix);
|
float billboard_alpha = mix(1.0, texture(tex, tc).a, billboard);
|
||||||
#if defined(Advanced_Lighting_Enabled)
|
#if defined(Advanced_Lighting_Enabled)
|
||||||
vec2 xy = gl_FragCoord.xy / u_screen;
|
vec2 xy = gl_FragCoord.xy / u_screen;
|
||||||
float FragZ = gl_FragCoord.z;
|
float FragZ = gl_FragCoord.z;
|
||||||
|
@ -23,7 +23,6 @@ in vec2 quadcorner;
|
|||||||
in float anglespeed;
|
in float anglespeed;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
flat out float billboard_mix;
|
|
||||||
out vec2 tc;
|
out vec2 tc;
|
||||||
out vec4 pc;
|
out vec4 pc;
|
||||||
|
|
||||||
@ -34,13 +33,11 @@ void main(void)
|
|||||||
gl_Position = vec4(0.);
|
gl_Position = vec4(0.);
|
||||||
pc = vec4(0.0);
|
pc = vec4(0.0);
|
||||||
tc = vec2(0.0);
|
tc = vec2(0.0);
|
||||||
billboard_mix = 0.0;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float lifetime = color_lifetime.w;
|
float lifetime = color_lifetime.w;
|
||||||
float alpha = mix(smoothstep(1.0, 0.8, lifetime), lifetime, billboard);
|
float alpha = mix(smoothstep(1.0, 0.8, lifetime), lifetime, billboard);
|
||||||
billboard_mix = billboard;
|
|
||||||
vec4 particle_color = vec4(color_lifetime.zyx, 1.0) * alpha;
|
vec4 particle_color = vec4(color_lifetime.zyx, 1.0) * alpha;
|
||||||
tc = Texcoord;
|
tc = Texcoord;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user