The lighting seems correct when I remove specular but as you can see, there is no reflections.
Is there an “easy” way to mimic the standard shader reflections in surface shaders?
left cube : standard shader
right cube : my shader with the same images/parameters
bottom left : why I need reflections
I think there was a bug with surface shaders where reflection information was not being passed in the shader. Wait for 5.0 b13, if it will still not work, please submit a bug.
did you managed to get transparency working with PBS Surface Shader? I did not find the switch, yet. Am I missing something?
This is what I’ve got so far, including a custom light model (currently untouched, just copied from the cginc-files), but it’s not working with the “Standard” Lightmodel, either.
After #define _GLOSSYENV 1 , what variables do you get to use and how are they used? I expected the shader example to use something in o.Emission but I guess it doesn’t work like that anymore. Anyone has found out anything yet? I urgently need to set some custom reflection strengths independent of the specular (and without changing the Reflection Probe Inspector strength)
I’d appreciate your insights.
EDIT: Small update on what I have found so far:
It looks like we may need to do it with custom lighting functions? They recently moved more code and now you find reflection related code in UnityPBSLighting.cginc
It’s all a little hard to follow with many things still spread out through tons of files but if I copypaste and base on the UnityPBSLighting.cginc I may be able to achieve what I want. I still need to try it, I havn’t touched it yet. I still think I’m missing something though, it seems all a little complicated… what if I want a much simpler Lighting Model but with access to the probes? It goes through so many files with things declared everywhere I don’t even know. But yeah that’s what I found so far.
Are you still able to use your custom lighting model with b17 ? I get an error : “Shader error in ‘Custom/PBS (Specular Setup)’: Syntax error at line 71 (on )”
I copy pasted the code posted here and it gives me this error. also I can’t get the metalic setup to work, it makes no difference if I use this: #define UNITY_SETUP_BRDF_INPUT SpecularSetup
or this #define UNITY_SETUP_BRDF_INPUT MetallicSetup