@3:35 the power function yields NaN because raising a negative number to the power of a decimal number (non-integer) generates a number with two components (complex number) that Unity cannot handle. great vid btw!!
Also, the idea that the pow function calculates the power of the input number as if without brackets is incorrect. If you pass -5.4 to pow it calculates (-5.4)^b (b being the exponent) and not -5.4^b. It really is the fact that b is a floating point operand that makes a < 0 return NaN. If pow was implemented with the signature pow(float a, int b), it would return (-5.4)^b. The entire value of a gets put in the processor registry and the sign bit doesn't magically disappear from it, that would be mad.
Could you please teach me how to create a URP skybox? I tried following tutorials in 2020 says to use Unlit, but it doesn't seem to work with Unity 2022.
Hi, well in the graph inspector go to graph settings and check the active targets, for some reasons we need to set it to "built in". If we set it to URP we might encounter ghosting or other weird artefacts.
Hi PRodi, For Panoramic skybox you will need an HDRI image texture, you can create one using external DCC tools like blender, photoshop etc. There are some free ones available online, but the high quality ones are often paid. Then you can just import them in unity, set "Texture shape" as "Cube" and "Mapping" based on image in import settings, after that you can simply use unity's build in shader. If you need customise one, you can create your own shader graph, grab the texture in "Cubemap Asset" node, sample it and pass it into "base color" of "Master node". Hope it help, Cheers!!
Any idea why this doesn't work in VR? It looks as it should in the editor and even in game mode. But when I build it to the headset its just all a solid blue no matter what any of the colors are. I unchecked the cast shadows and switched the Depth Write to Forced Disabled to get it to work in the editor as Ive seen suggested. Still no go in VR though :-(
Hey, I am sorry but I am afraid I am not able to help with this one, I don't have a VR headset to test on and based on your comment, it seems like it is working on an editor and messing up when built to VR. But just in case, have you checked the camera is set to render Skybox and not solid color?
I know this might be a bit late to comment, but I'm experiencing the exact same issue described by @BCABPP. I've already tried checking and testing various URP Pipeline settings, adjusted my player camera settings as recommended, and even experimented with modifying some nodes in the shader itself. I suspect that a specific node-possibly the Position node-might not be functioning correctly in the built game, but I lack the technical expertise to confirm this. Has anyone managed to solve this problem? By the way, great video! I loved the tutorial-it’s both informative and visually stunning. Congratulations!
Hi Erfan, I am assuming you are talking about the NaN error in Power node, in order to prevent that I just clamped the values between 0 and 1. If you are talking about something different, please tell me the time stamp so I can help you better.
@3:35 the power function yields NaN because raising a negative number to the power of a decimal number (non-integer) generates a number with two components (complex number) that Unity cannot handle. great vid btw!!
Also, the idea that the pow function calculates the power of the input number as if without brackets is incorrect. If you pass -5.4 to pow it calculates (-5.4)^b (b being the exponent) and not -5.4^b. It really is the fact that b is a floating point operand that makes a < 0 return NaN. If pow was implemented with the signature pow(float a, int b), it would return (-5.4)^b. The entire value of a gets put in the processor registry and the sign bit doesn't magically disappear from it, that would be mad.
I just started using shader graphs and this is my first time understanding it thank you
I just started using shader graphs, Thank you for the in depth tutorial!
Super helpful. Thank you for the tutorial.
Thank you for this tutorial. Very well explained and easy to follow
Thank you got the guide, and I appreciate the explanation on what the various node did.
Glad it helped! Appreciate your support 😊
Thx for the tutorial! It was great fr.
thank you thank you soo much for this tutorial sir !
Awesome tutorial, thank you.
Could you please teach me how to create a URP skybox? I tried following tutorials in 2020 says to use Unlit, but it doesn't seem to work with Unity 2022.
I understood.Using Unlit,the box of cast a shadow is uncheked
Hi, well in the graph inspector go to graph settings and check the active targets, for some reasons we need to set it to "built in".
If we set it to URP we might encounter ghosting or other weird artefacts.
Do you know how to make similar shader to: "Skybox/Panoramic" in Shader Graph?
Hi PRodi,
For Panoramic skybox you will need an HDRI image texture, you can create one using external DCC tools like blender, photoshop etc. There are some free ones available online, but the high quality ones are often paid.
Then you can just import them in unity, set "Texture shape" as "Cube" and "Mapping" based on image in import settings, after that you can simply use unity's build in shader.
If you need customise one, you can create your own shader graph, grab the texture in "Cubemap Asset" node, sample it and pass it into "base color" of "Master node".
Hope it help, Cheers!!
@@iDigvijaysinhGThanks working well - with some extra tweaks I managed to get great custom results :)
Any idea why this doesn't work in VR? It looks as it should in the editor and even in game mode. But when I build it to the headset its just all a solid blue no matter what any of the colors are. I unchecked the cast shadows and switched the Depth Write to Forced Disabled to get it to work in the editor as Ive seen suggested. Still no go in VR though :-(
Hey, I am sorry but I am afraid I am not able to help with this one, I don't have a VR headset to test on and based on your comment, it seems like it is working on an editor and messing up when built to VR.
But just in case, have you checked the camera is set to render Skybox and not solid color?
I know this might be a bit late to comment, but I'm experiencing the exact same issue described by @BCABPP. I've already tried checking and testing various URP Pipeline settings, adjusted my player camera settings as recommended, and even experimented with modifying some nodes in the shader itself. I suspect that a specific node-possibly the Position node-might not be functioning correctly in the built game, but I lack the technical expertise to confirm this. Has anyone managed to solve this problem?
By the way, great video! I loved the tutorial-it’s both informative and visually stunning. Congratulations!
so what solution do you have for the black parts when blending?
Hi Erfan,
I am assuming you are talking about the NaN error in Power node, in order to prevent that I just clamped the values between 0 and 1.
If you are talking about something different, please tell me the time stamp so I can help you better.
I don't know why but my position node is different of your. There is much more gradient between each quarter colors.
Are you on HDRP?