Clean up object texture loading, custom mipmap generator
This commit is contained in:
@@ -5,21 +5,19 @@
|
||||
layout(location = 2) uniform sampler2D texBase;
|
||||
layout(location = 3) uniform sampler2DArray texAnim;
|
||||
layout(location = 4) uniform uint animFrame;
|
||||
layout(location = 5) uniform vec3 IDcolor;
|
||||
|
||||
in vec2 fragTC;
|
||||
|
||||
flat in uint fragUseAnimTex;
|
||||
|
||||
layout(location = 0) out vec4 color;
|
||||
layout(location = 1) out vec4 IDcolor_out;
|
||||
layout(depth_unchanged) out float gl_FragDepth;
|
||||
|
||||
void main(void) {
|
||||
color = bool(fragUseAnimTex)?texture(texAnim, vec3(fragTC, animFrame)):texture(texBase, fragTC);
|
||||
vec4 texel = bool(fragUseAnimTex)?texture(texAnim, vec3(fragTC, animFrame)):texture(texBase, fragTC);
|
||||
|
||||
if (color.w < 0.5)
|
||||
if (texel.a < 0.5)
|
||||
discard;
|
||||
|
||||
IDcolor_out = vec4(IDcolor, 1.0);
|
||||
|
||||
color = texel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user