Skip to content

Flow from CPU to GPU terrain gen #23

@fluffyfreak

Description

@fluffyfreak

Had dreams about the Pioneer code actually. Kind of have a plan for tackling conversion to GPU based terrain. Odd that I already sort of have that working but cannot integrate it back into Pioneer :/ (https://github.com/fluffyfreak/pioneer/compare/seeNoEvil_00) that branch is a world of hurt.

Plan as it formed in dreamy dreamy lalaland:

  1. thread terrain generation with jobs,
  2. switch heightmapped planets (Earth/Moon/Mars) to use colour maps,
  3. preprocess all heightmapped planets maps into cubemaps/per-face-maps,
  4. make all planets render highest level noise into per-face-heightmap,
  5. unify/simplify terrain gen to all use above high-level heightmap,
  6. switch to generating per-patch heightmaps,
  7. using heightmap offset in vertex shader instead of generating vertices,
  8. use texture splatting (/other) for terrain instead of vertex colour,
  9. ???
  10. Profit!

By step #8 there's nothing to stop me replacing where the heightmap is generated, CPU or GPU. #8 is also at least an immediate 50% speedup since using the noise system for that is horrific. New patch data can come from anywhere off the back of any request since #1 moved that out into a generic "job" system. The rest is a mix of little bits of work and dealing with legacy crap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions