Fixed multiple issues with mipmaps and alpha discard
This commit is contained in:
@@ -30,14 +30,12 @@ void main() {
|
||||
//TODO: FIXME, need to manually compute the mip colour
|
||||
vec4 colour = texture(blockModelAtlas, texPos, ((flags>>1)&1u)*-5.0);//TODO: FIXME mipping needs to be fixed so that it doesnt go cross model bounds
|
||||
//Also, small quad is really fking over the mipping level somehow
|
||||
if ((flags&1u) == 1 && colour.a <= 0.25f) {
|
||||
if ((flags&1u) == 1 && (texture(blockModelAtlas, texPos, -16.0).a <= 0.1f)) {
|
||||
//This is stupidly stupidly bad for divergence
|
||||
//TODO: FIXME, basicly what this do is sample the exact pixel (no lod) for discarding, this stops mipmapping fucking it over
|
||||
if (texture(blockModelAtlas, texPos, -4.0).a <= 0.1f) {
|
||||
#ifndef DEBUG_RENDER
|
||||
discard;
|
||||
#endif
|
||||
}
|
||||
#ifndef DEBUG_RENDER
|
||||
discard;
|
||||
#endif
|
||||
}
|
||||
|
||||
//Conditional tinting, TODO: FIXME: REPLACE WITH MASK OR SOMETHING, like encode data into the top bit of alpha
|
||||
|
||||
Reference in New Issue
Block a user