mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-26 08:48:50 -06:00
disable texture filtering experiment
This commit is contained in:
parent
4bf2b350c6
commit
73940d61ff
|
@ -9,26 +9,26 @@ flat in uint v_tex_index;
|
||||||
out vec4 color;
|
out vec4 color;
|
||||||
uniform sampler2DArray tex;
|
uniform sampler2DArray tex;
|
||||||
|
|
||||||
vec4 alpha_drop(vec4 b, vec4 a) {
|
// vec4 alpha_drop(vec4 b, vec4 a) {
|
||||||
if ((a.w < 1.) || (b.w < 1.)) {
|
// if ((a.w < 1.) || (b.w < 1.)) {
|
||||||
return vec4(b.xyz, 0.);
|
// return vec4(b.xyz, 0.);
|
||||||
}
|
// }
|
||||||
return a;
|
// return a;
|
||||||
}
|
// }
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// base color from texture
|
// base color from texture
|
||||||
color = texture(tex, vec3(v_uv, v_tex_index));
|
color = texture(tex, vec3(v_uv, v_tex_index));
|
||||||
// HACKY texture "antialiasing"
|
// HACKY texture "antialiasing"
|
||||||
color += (
|
// color += (
|
||||||
alpha_drop(color, texture(tex, vec3(v_uv + vec2(.000, .001), v_tex_index))) +
|
// alpha_drop(color, texture(tex, vec3(v_uv + vec2(.000, .001), v_tex_index))) +
|
||||||
alpha_drop(color, texture(tex, vec3(v_uv + vec2(.001, .000), v_tex_index))) +
|
// alpha_drop(color, texture(tex, vec3(v_uv + vec2(.001, .000), v_tex_index))) +
|
||||||
alpha_drop(color, texture(tex, vec3(v_uv + vec2(.001, .001), v_tex_index))) +
|
// alpha_drop(color, texture(tex, vec3(v_uv + vec2(.001, .001), v_tex_index))) +
|
||||||
alpha_drop(color, texture(tex, vec3(v_uv - vec2(.000, .001), v_tex_index))) +
|
// alpha_drop(color, texture(tex, vec3(v_uv - vec2(.000, .001), v_tex_index))) +
|
||||||
alpha_drop(color, texture(tex, vec3(v_uv - vec2(.001, .000), v_tex_index))) +
|
// alpha_drop(color, texture(tex, vec3(v_uv - vec2(.001, .000), v_tex_index))) +
|
||||||
alpha_drop(color, texture(tex, vec3(v_uv - vec2(.001, .001), v_tex_index)))
|
// alpha_drop(color, texture(tex, vec3(v_uv - vec2(.001, .001), v_tex_index)))
|
||||||
) / 6.;
|
// ) / 6.;
|
||||||
color /= 2.;
|
// color /= 2.;
|
||||||
// discard fully transparent pixels
|
// discard fully transparent pixels
|
||||||
if (color.w <= 0.0) {
|
if (color.w <= 0.0) {
|
||||||
discard;
|
discard;
|
||||||
|
|
Loading…
Reference in a new issue