Search Issue Tracker
Using ViewDir in custom Lightmap functions in shaders doesn't work
Open the project.
Observe the two pink spheres
The sahders on these spheres try and use custom lightmap functions including the optional viewDIr. For some reason they error out with
'expression left of ."viewDir" is not a struct or array'
The original thread can be found here, and where Aras has requested this be submitted as a bug.
According to this page using an optional ViewDir in the custom lightmap function paramaters should work (decode lightmaps)
The ToneMapLightmap shader in the supplied project uses the shader found here
which works, but once you add viewDir to it fails.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Player crashes when built with IL2CPP Scripting backend
- TextMeshPro package throws multiple Shader errors when importing TMP Essential Resources
- Package Manager search text field has no validation and leads to Editor freezes
- PlayerLoop.SetPlayerLoop() function is ignored when playing game in Player
- Lighting data is carried over from one Scene to another when changing Scenes in the Play Mode