+2
Under review

Specular and Gloss 2D texture error on Deferred.

Rubén García Vilà 10 years ago updated by Tharyn Valavanis 9 years ago 12
Hi Joachim,

Im having problems to set a PBL shader with Deferred Pre-Pass. This is the error when I try to plug a 2D texture to Specular or Gloss (Unity 4.5):

Shader error in 'Shader Forge/IBL+TessTest': undeclared identifier 'node_150' at line 575

And thats the node setup (with energy concerving and Double incoming light enabled):

Image 235
Under review
Hm. I think you may need both when doing deferred. Try plugging something into both gloss and spec, and make sure it's only one channel instead of three or two. (Use the R output rather than the RGB output)
Its doing exatly the same, with the same error:


Well now, the line of the error is 578.
When i use a color node there is no problem.
If you disconnect the Skyshop nodes, does it work?
If you disconnect the Tess/Disp node trees, does it work?
It does not Work. Here it is the image:


With forward there is no problems, its only in deferred. Maybe a problem with unity 4.5?
The error is still that:

Shader error in 'Shader Forge/IBL+TessTest': undeclared identifier 'node_150' at line 216

And the other error im getting:
Serialization depth limit exceeded at 'ShaderForge::SF_PreviewSettings'. There may be an object composition cycle in one or more of your serialized classes.
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
I have found something,

When I disable Lightmap support it works perfectly, I can connect RGB to Specular and Alpha to Gloss and there is no crash.
Can it be a bug?
Ah, yeah that's a bug then
Will be fixed soon? Or is a hard code fix?
It will take a while. But essentially, you need to move a variable definition up. node_150, in your case, is defined in a limited scope, and something beyond that scope thinks the variable node_150 is defined, while it's not
Old topic, but do you have any idea of when this bug would be fixed? Are we looking at waiting for after 1.0 for this to get fixed? If so, is there a simple manual fix I could do (I'm not horribly good with code)
It might work if you plug in spec and gloss, if you haven't already. Not entirely sure actually :(
Nah, it does not work. You also kinda need specular and glossiness for colored metals and the like :/ I'm using realtime shadows until it's hopefully fixed.
Any news on this one I've hit a wall. 
A Value works. A bitmap does not.
I also have tried remapping the red channel from the bitmap from 0-255 to 0-1. no go.
It seams the bug is in the use of the actual texture.