Skip to content

Conversation

ultrazar
Copy link
Contributor

@ultrazar ultrazar commented Jul 2, 2021

I've been working on an online HTML5 game where you can explore the space.
Here a pull request with the most interesting changes that I made.
That are:

  • Clouds shader ( with two versions, one of low quality and other with best quality )
  • Terrain Cache, a simple way to save all the patches of a planet
  • Stars shader
  • And some bugs solved

terrain_job = PGGlobals.queue_terrain_patch(data)
terrain_job.connect("job_finished", self, "on_patch_finished", [], CONNECT_DEFERRED)


# Update this node in the quadtree.
func visit():
var viewer_in_range: bool = \
_viewer_node.global_transform.origin.distance_to(_center) \
_viewer_node.global_transform.origin.distance_to(planet.to_global(_center)) \
Copy link
Contributor Author

@ultrazar ultrazar Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a bug, don't load correct patches when rotating the planet. Solved with to_global function

@Valinakova
Copy link

Cool! I will check this stuff out

@Hoimar
Copy link
Owner

Hoimar commented Jul 30, 2021

Clouds are looking good already!

So while checking this out, I spotted a problem with the cloud shader, it warps towards the poles of the planetary sphere, because the vertex distribution is like that on a UV sphere.
Perhaps you want to look into that, otherwise I'll do it when I have time.

Also, could you rebase this PR onto the latest commit onto the dev branch, 1ddb9bd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants