Merge branch 'capucho/more-uniformity' into 'master'

Fix uniformity bug in ui shader

See merge request veloren/veloren!2709
This commit is contained in:
Joshua Barretto 2021-07-31 21:33:34 +00:00
commit 91ea29f108

View File

@ -21,11 +21,11 @@ layout(location = 0) out vec4 tgt_color;
void main() {
// Text
if (f_mode == uint(0)) {
tgt_color = f_color * vec4(1.0, 1.0, 1.0, texture(sampler2D(t_tex, s_tex), f_uv).a);
tgt_color = f_color * vec4(1.0, 1.0, 1.0, textureLod(sampler2D(t_tex, s_tex), f_uv, 0).a);
// Image
// HACK: bit 0 is set for both ordinary and north-facing images.
} else if ((f_mode & uint(1)) == uint(1)) {
tgt_color = f_color * texture(sampler2D(t_tex, s_tex), f_uv);
tgt_color = f_color * textureLod(sampler2D(t_tex, s_tex), f_uv, 0);
// 2D Geometry
} else if (f_mode == uint(2)) {
tgt_color = f_color;