Search Issue Tracker

Fixed in [Package] 5.3.0

Votes

0

Found in [Package]

4.6.0-preview

Issue ID

1115833

Regression

No

[Particles] [LWRP] Error messages about bump map param being missing

Package: Scriptable Render Pipeline Lightweight

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 3Secondary functionality broken

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:GetTextureImpl()

UnityEngine.Material:GetTexture(String) (at C:\buildslave\unity\build\Runtime\Export\Shader.cs:568)

UnityEditor.Experimental.Rendering.LightweightPipeline.ParticlesLitShaderGUI:DoVertexStreamsArea(Material) (at Library\PackageCache\com.unity.render-pipelines.lightweight@4.6.0-preview\Editor\ShaderGUI\ParticlesLitShaderGUI.cs:439)

UnityEditor.Experimental.Rendering.LightweightPipeline.ParticlesLitShaderGUI:ShaderPropertiesGUI(Material) (at Library\PackageCache\com.unity.render-pipelines.lightweight@4.6.0-preview\Editor\ShaderGUI\ParticlesLitShaderGUI.cs:201)

UnityEditor.Experimental.Rendering.LightweightPipeline.ParticlesLitShaderGUI:OnGUI(MaterialEditor, MaterialProperty[]) (at Library\PackageCache\com.unity.render-pipelines.lightweight@4.6.0-preview\Editor\ShaderGUI\ParticlesLitShaderGUI.cs:153)
------------

I believe the fix is this (discussed on Slack with Felipe Lira)

-----------
```bool useTangents = material.GetTexture("_BumpMap") && useLighting;```
should be
```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);```
should be
```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.

Response avatar

Resolution Note:

Particle GUI now checks to see of shader contains the bump map property before trying to read it

Comments (3)

  1. Aa3741cced3bbe0cfb98385b733c86f5?d=mm

    xendera

    Jan 11, 2019 12:23

    Income Tax Return can be easily uploaded online using Digital Signatures ... Login with your User-id and Password on the Income Tax efiling website <a href="https://www.financexod.com/login-income-tax-e-filing-account/">income tax login</a>

  2. Aa3741cced3bbe0cfb98385b733c86f5?d=mm

    xendera

    Jan 11, 2019 12:21

    Income Tax Return can be easily uploaded online using Digital Signatures ... Login with your User-id and Password on the Income Tax efiling website <a href="https://www.financexod.com/login-income-tax-e-filing-account/">income tax login</a>

  3. Aa3741cced3bbe0cfb98385b733c86f5?d=mm

    xendera

    Jan 11, 2019 12:20

    Income Tax Return can be easily uploaded online using Digital Signatures ... Login with your User-id and Password on the Income Tax efiling website <a href="https://www.financexod.com/login-income-tax-e-filing-account/">income tax login</a>

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.