sp614x / optifine

1.77k stars 420 forks source link

[Shader] Normal texture of held map item is incorrect #7627

Closed GeForceLegend closed 3 months ago

GeForceLegend commented 3 months ago

Description of Issue

Normal texture sample for held map item always be (0.5, 0.5, 0.5, 0.5) without resource packs. Only the real map content is affected, edge of map is working fine.

Steps to Reproduce

  1. Using sp614x's SuperTester shaderpack
  2. Set setting GBUFFER_DEBUG to NORMALS_TEXTURE, COLOR_WEIGHT to 1.0
  3. Hold a map item and see its content is gray
  4. Change line 31 of shaders/gbuffers_common.glsl to get the alpha channel of normal texture, reload shaders, and see content of held map item is still gray
    #elif GBUFFER_DEBUG == NORMALS_TEXTURE
    debug = texture2D(normals, texcoord).www;

OptiFine Version

1.20.1 I6

Installation Method

Standalone

F3 Debug Screenshot

Setting GBUFFER_DEBUG to NORMALS_TEXTURE, COLOR_WEIGHT to 1.0 2024-03-10_09 37 42

Modified code to get alpha channel of normal texture 2024-03-10_09 38 35

Additional Information

Nsight Graphics capture showing the normal texture is all pure 0x7f 20240310104444

sp614x commented 3 months ago

Fixed, coming in next preview.