KhronosGroup / glTF-Sample-Viewer

Physically-Based Rendering in glTF 2.0 using WebGL
Apache License 2.0
1.29k stars 238 forks source link

normalTexture lighting problem with KHR_texture_transform #592

Open echadwick-artist opened 1 week ago

echadwick-artist commented 1 week ago

glTF Sample Viewer seems to be an outlier in how it handles lighting for normalTextures being rotated with KHR_texture_transform (bottom row).

Should we be rotating the tangent space for the model? For more context on lighting rotated normal maps, please see the comment here by @emackey https://github.com/KhronosGroup/glTF-Sample-Assets/issues/153#issuecomment-2484079933

Lighting is the Cannon HDR: https://polyhaven.com/a/cannon

387796205-a36fc07e-d82a-4298-9c00-b9364fd3ec6d NormalTextureRotation_glTF.zip