Radagasd / Radagasd.github.io

My personal website: https://radagasd.github.io
1 stars 0 forks source link

Skybox tutorial part 1 | Kelvin van Hoorn #4

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Skybox tutorial part 1 | Kelvin van Hoorn

Kelvin van Hoorn’s website for technical art

https://kelvinvanhoorn.com/2022/03/17/skybox-tutorial-part-1/

Sam-Burton commented 2 years ago

Heads up for anyone trying to use this in VR, you need to disable ZClip https://docs.unity3d.com/Manual/SL-ZClip.html Got it from this thread here -> https://forum.unity.com/threads/hlsl-or-shadergraph-skybox-shader-with-single-pass-instancing.1234660/

Justin-sky commented 1 year ago

Where is the part2?

Radagasd commented 1 year ago

Unfortunately there isn't a part 2. After this work I got a full-time job, and thus time and motivation to make it have dwindled.

If you're interested in the mathematical formulas for calculating sun and moon positions I can recommend the following sources:

majyo commented 1 year ago

Thanks for yuour tutorial. The sky looks really beautiful!

majyo commented 1 year ago

I'm also wondering if a physically based sky suitable for stylized shading?

iamaryanshandilya commented 9 months ago

I used your shader code and got a problem which I summarized here. I will be grateful if you could help me somehow https://www.reddit.com/r/unity/comments/1ai633b/daynight_cycle_skybox_shader_for_urp_doesnt_work/?utm_source=share&utm_medium=web2x&context=3

Radagasd commented 9 months ago

I used your shader code and got a problem which I summarized here. I will be grateful if you could help me somehow https://www.reddit.com/r/unity/comments/1ai633b/daynight_cycle_skybox_shader_for_urp_doesnt_work/?utm_source=share&utm_medium=web2x&context=3

My first incline would be that with linear filtering and wrapping it is blending the dark part of the sky gradient with the brightest. Because when sunZenithDot01 gets close to 0 or 1 it would wrap around.

Have you done the following as stated in the tutorial? Specifically setting the texture to be clamped?

For the gradient texture import settings I've turned off generate mip maps, set the filter mode to clamp, and set compression quality to high.
iamaryanshandilya commented 9 months ago

Hello, yea it seems that was the problem. I didnt clamp the gradients. Thanks for bringing it to my attention and thank you for making such a nice tutorial. It helped a lot