- Home /
function unity_SpecCube0 doesn't work (or problem with skyBox)
I have these lines in my shader code.
half4 skyData = UNITY_SAMPLE_TEXCUBE(unity_SpecCube0, worldRefl);
half3 skyColor = DecodeHDR (skyData, unity_SpecCube0_HDR);
fixed4 c = 1 or fixed4 c = 0;
c.rgb = skyColor;
And after these lines skyColor is zero and my return color is black. But I had a project before, with this shader, and everything was fine. Also I downloaded sources from official documentation https://docs.unity3d.com/540/Documentation/Manual/SL-VertexFragmentShaderExamples.html and it doesn't work too. I set up SkyBox in Window -> Rendering -> Lighting -> Environment -> SkyBox Material
Answer by dolovnyak · Oct 24, 2020 at 12:26 PM
In the end I gave up and began to use legacy->cubemap passing skybox of the current scene
Your answer
Follow this Question
Related Questions
Dynamic Skybox 2 Answers
Unity 5 procedural skybox with working bottom 1 Answer
How to made a normal skybox with a rectangle part of solid color 0 Answers
What happens if I use the wrong shader for a skybox? 1 Answer
Skybox blending 2 Answers