Starry Shader for Sky Sphere

@Aerion A rough option with blinking: https://stackblitz.com/edit/starry-skydome-t1j7od

1 Like

@prisoner849 : this is SWEET! Thank you so much! Is there a way to tween the speed so it smoothly transitions the fade of the stars? Thank you!

@Aerion Do you want stars disappear with fading out?

@prisoner849 : Can there be a variable that can turn that on & off? Thank you! :slight_smile:

@Aerion Yes, one more uniform :slight_smile: Try it yourself, you’ve got enough knowledge and examples :slight_smile:

      float sn = sin(time * 2.) * 0.5 + 0.5;
      float starNoise = (cnoise(p * freq) * 0.5 + 0.5) * sn;
1 Like

@prisoner849 @Aerion @Andre_Almeida – thanks for bringing this back up and fixing the gpu issue!! Also love the blinking addition :slight_smile:

Going to update the project I made this for with the fix~

1 Like

@sneha-belkhale : Would be AWESOME if you could make this work like the night time sky in Skyrim!

Thanks for the fix
I made a video game with this shader I had people with the shader not displaying as it should, like in the fourth comment above. I hope your fix should do it !
here is the game : https://store.steampowered.com/app/3147930/Sphere_vs_Gravity/

let me know if want to try it.

Just saw this post… the stackblitz version was super broken, and stackblitz itself seems like… terrible on windoze.

I moved it, along w the fix mentioned by @prisoner849 into a glitch if anyone wants it:

https://precious-climbing-kip.glitch.me

Very cool @sneha-belkhale :slight_smile:

5 Likes

that is cool !

I have 2 questions :

1- what Gpu card do you use ?
2- can you add glows or meteors ?

  1. 1080
  2. yes
1 Like

does your code take care of this issue ?

On my rig yeah.

code: Glitch :・゚✧

live site: https://precious-climbing-kip.glitch.me

for anyone wondering, the issue is due to the behavior of glsl pow() function being different on macos/windows. The fix required using abs( pow( .

Why this is the case is somewhat mystifying to me… probably due to ANGLE, and the conversion to hlsl.

2 Likes

1- So you think the problem is solved for rigs with newer gpus ?
2- and what about glows/meteors can we expect you to provide us with code ?

  1. Yes
  2. No - it would need to be written. I was just saying that it was possible. :slight_smile:
3 Likes

anyone with a 30xx Nvidia series gpu or higher can confirm the shader works correctly ?

It works on my 1080gtx and my 4090.

1 Like

wow thanks a lot @manthrax

1 Like