Some fixes for some shader compiler

This commit is contained in:
Benau 2017-10-20 09:25:43 +08:00
parent ebdde49984
commit 8a0232382a
2 changed files with 6 additions and 4 deletions

View File

@ -36,12 +36,13 @@ void main(void)
}
float lifetime = color_lifetime.w;
pc = vec4(color_lifetime.zyx, 1.0);
vec4 particle_color = vec4(color_lifetime.zyx, 1.0);
tc = Texcoord;
#if !defined(sRGB_Framebuffer_Usable) && !defined(Advanced_Lighting_Enabled)
pc.rgb = pow(pc.rgb, vec3(1.0 / 2.2));
particle_color.rgb = pow(particle_color.rgb, vec3(1.0 / 2.2));
#endif
pc = particle_color;
vec4 viewpos = vec4(0.);
if (flips == 1)

View File

@ -41,12 +41,13 @@ void main(void)
float lifetime = color_lifetime.w;
float alpha = mix(smoothstep(1.0, 0.8, lifetime), lifetime, billboard);
billboard_mix = billboard;
pc = vec4(color_lifetime.zyx, 1.0) * alpha;
vec4 particle_color = vec4(color_lifetime.zyx, 1.0) * alpha;
tc = Texcoord;
#if !defined(sRGB_Framebuffer_Usable) && !defined(Advanced_Lighting_Enabled)
pc.rgb = pow(pc.rgb, vec3(1.0 / 2.2));
particle_color.rgb = pow(particle_color.rgb, vec3(1.0 / 2.2));
#endif
pc = particle_color;
vec4 viewpos = vec4(0.);
if (flips == 1)