sp614x / optifine

1.81k stars 416 forks source link

[BUG] Texture Atlas anomaly causing glowing textures #7029

Open Tanks4teh opened 2 years ago

Tanks4teh commented 2 years ago

Description of Issue

When running Minecraft while using shaders (BSL) and an HD resource pack (Misa's 64x64), some textures will inexplicably glow, despite no emissive maps being set for them in the pack. The issue is often temporarily resolved by reloading textures with F3+T, but will reappear when the game is restarted. When running the -DsaveTextureMap=true argument in the JVM parameters, the assembled atlases for both specular and diffuse textures show a potential source for the error. Inexplicable 1x1 green dots appear in the diffuse atlas, and a large black rectangle appears in the specular atlas. In this case, the black blob intersects with basalt and the top textures of barrels.

Steps to Reproduce

  1. Run Minecraft with a LabPBR enabled shader and resource pack with a large degree of custom textures

OptiFine Version

OptiFine 1.19 HD U H8

Installation Method

Direct installation by running the JAR file

Log Files/Crash Reports

latest.log

F3 Debug Screenshot

2022-07-25_18 41 33

Prior Testing

Additional Information

The screenshots show the hand item of Basalt glowing while the block in the world is unaffected. This is because the Basalt texture in this pack has heavy CTM implementation, with the atlas anomalies not appearing anywhere near the portion of the atlas that pertains to CTM Capture A handy highlight of the blob in question by compositing the diffuse textures over the specular textures. Full versions of the atlases will be attached below. https://www.dropbox.com/s/y5hmbwubpfqrpuc/textures_atlas_blocks_0.png?dl=0 (diffuse atlas was too large to upload directly) textures_atlas_blocks_s_0

MaxiKevey commented 2 years ago

Same issue here. This 4x4 black tiles area expands down by 1 to 4 tiles, thus covering whatever texture had that spot to begin with. How many tiles are covered seems to be random for each machine.

MaxiKevey commented 2 years ago

It appears to affect all shaders that support PBR materials.

fayer3 commented 2 years ago

looked at the textures from misa 1.19a-pre this seems to be caused by the conduit wind, where the normal textures are 256x8192 animated ones, and the specular is only a single frame 64x64

MaxiKevey commented 2 years ago

Well it's still a bug then. This is the only texture where mismatched resolutions are a problem.