Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

Hey I'm trying to use these shaders in Godot 4. They all work fine accept for the IceWorld's `Lakes` shader, which is now coloring the box that contains the planet (see screenshot). The shader code from Godot 3 -> 4 is identical aside from the the 3 colors in the shader being defined as `source_color` instead of `hint_color`.

I don't know anywhere near enough about shaders to troubleshoot this myself, so I'm hoping you might understand why this is happening, and maybe be able to provide me with a quick fix?

Cheers!

(+1)

Hey. thanks for letting me know. Here's a quick little fix:  

  • Click on the "shader" button to see the shader code.
  • Add this line: "float d_circle = distance(uv, vec2(0.5));" on line 74. Just before the line "uv = spherify(uv);".
  • On line 96, replace "a *= step(distance(vec2(0.5), uv), 0.5);" with the line "a *= step(d_circle, 0.5);"

I just tested it and that works for me. It's actually a mistake I made in the original shader code, but it seems like godot 3 handles it different than 4.

Hope that helps!

It does, thank you!