kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
420 stars 21 forks source link

Конвертация obj в мир #205

Open DileSoft opened 2 years ago

DileSoft commented 2 years ago

Сделать конвертер который тупо берет 1 или 2 самых верхних слоя а все остальное игнорирует и проверить что получится.

kvark commented 2 years ago

Rough plan:

  1. game config lists objects and their positions
  2. on loading, the renderer fires a job for each object
    1. load the OBJ and determine the 2D coordinate range where it applies
    2. create 2 depth textures and copy the level0 into the first one
    3. object with its back-faces only is rendered into this depth
    4. depth is copied into the other texture
    5. object with its front faces only is rendered into the depth
    6. both depths are requested for readback to CPU
  3. results get written back to level data