sp614x / optifine

1.81k stars 418 forks source link

Incorrect Rendering with Custom Layers #2298

Open DiaTheAngel opened 5 years ago

DiaTheAngel commented 5 years ago

Custom layer on dark_oak_door set to translucent https://cdn.discordapp.com/attachments/564322408065138710/564967131955986435/unknown.png

No custom layer https://cdn.discordapp.com/attachments/564322408065138710/564967387753873408/unknown.png

Is custom layer messing up with zBuffer or something?

sp614x commented 5 years ago

Moving the door to translucent layer only enables alpha blending. This should only affect the semi-transparent textures.

The translucent geometry is rendered in reverse order (far to near) in order to blend the colors correctly. Usually this makes no problems for opaque textures (except for small performance diference).

The rendering looks like disabled depth test. There may be something wrong in the model, for example wrong face orientation.

sp614x commented 5 years ago

The image is very dark, it is hard to see what is the problem. Brightened up version:

solid image

translucent image

sp614x commented 5 years ago

The model is strange, look at this part:

image

The pixels are not aligned with the edge. In the translucent screenshot the side texture looks stretched as if the UV mapping is not correct.