Search Issue Tracker
Fixed in [Package] 5.3.0
Found in [Package]
[Particles] [LWRP] Error messages about bump map param being missing
I don't have a repro, but Blizzard are reporting that they are getting spammed by this error when using the particle shaders:
Material doesn't have a texture property '_BumpMap'
UnityEngine.Material:GetTexture(String) (at C:\buildslave\unity\build\Runtime\Export\Shader.cs:568)
UnityEditor.Experimental.Rendering.LightweightPipeline.ParticlesLitShaderGUI:DoVertexStreamsArea(Material) (at Library\PackageCache\firstname.lastname@example.org\Editor\ShaderGUI\ParticlesLitShaderGUI.cs:439)
UnityEditor.Experimental.Rendering.LightweightPipeline.ParticlesLitShaderGUI:ShaderPropertiesGUI(Material) (at Library\PackageCache\email@example.com\Editor\ShaderGUI\ParticlesLitShaderGUI.cs:201)
UnityEditor.Experimental.Rendering.LightweightPipeline.ParticlesLitShaderGUI:OnGUI(MaterialEditor, MaterialProperty) (at Library\PackageCache\firstname.lastname@example.org\Editor\ShaderGUI\ParticlesLitShaderGUI.cs:153)
I believe the fix is this (discussed on Slack with Felipe Lira)
```bool useTangents = material.GetTexture("_BumpMap") && useLighting;```
```bool useTangents = useLighting && material.GetTexture("_BumpMap");```
(check the bool first, otherwise we risk asking for a prop that doesnt exist, and getting an error msg)
```SetKeyword(material, "_NORMALMAP", material.GetTexture("_BumpMap") && useLighting);
SetKeyword(material, "_METALLICGLOSSMAP", (material.GetTexture("_MetallicGlossMap") != null) && useLighting);```
```SetKeyword(material, "_NORMALMAP", useLighting && material.GetTexture("_BumpMap"));
SetKeyword(material, "_METALLICGLOSSMAP", useLighting && material.GetTexture("_MetallicGlossMap"));```
(same reason as above)
It is needed all the way back to 2018.3.
Particle GUI now checks to see of shader contains the bump map property before trying to read it
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Interactions] Some Interactions don't have the correct startTime, time and duration in callbackContext.
- [Interactions] InputAction.CallbackContext.interaction does not hold the correct value, when it is set to Default.
- [Editor] When Preference window is open, exiting Playmode generates NullReferenceException.
- [Addressables] Models have deformations when they are imported from AssetBundle and Play Mode Script is set to Packed Play mode
- The error of " 'Light' does not contain a definition for 'SetLightDirty' " when building the project