StarArawn / harmony

A modern 3D/2D game engine that uses wgpu.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Re-write image to support multiple formats and handle Skybox loading better.

StarArawn opened this issue · comments

commented

We need to re-write the image struct to support more formats other than the standard Rgba8UnormSrgb.

Right now a single 2D flat image gets processed into a cube map for the skybox. This process is fairly static and will run on any HDR files loaded using the asset manager. However we should have some way of marking images as being required for a skybox and run them through the process at that point. There's a few ways we might do this:

  1. Have a .skybox file, that references the texture it uses, similar to the .shader files.
  2. Wait to process skyboxes until after the user sets up the scene and run through each skybox entity find out what texture it points to and process it.

Currently I am leaning towards 1 as it cuts out some of the guess work.

commented

#17
Completes this issue.