Skip to content

SPTerrainLighting does not sample SpecularMap #2653

@riccardobl

Description

@riccardobl

Changing the default here makes Common/MatDefs/Terrain/TerrainLighting.j3md pick its LightMode SinglePass technique by default (jme3-terrain/src/main/resources/Common/MatDefs/Terrain/TerrainLighting.j3md:179-240). That path still does not implement terrain specular maps: SPTerrainLighting.frag never samples m_SpecularMap and always uses m_Shininess directly (jme3-terrain/src/main/resources/Common/MatDefs/Terrain/SPTerrainLighting.frag:5,649-651), whereas the current MultiPass shader applies both SpecularMap and useSpecularMapAsShininess (jme3-terrain/src/main/resources/Common/MatDefs/Terrain/TerrainLighting.frag:642-651). Any existing terrain material that relies on those parameters will therefore lose its specular response after this default flips, even though the app never opted into single-pass lighting.

Originally posted by @chatgpt-codex-connector[bot] in #2652 (comment)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

tracked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions