kikonen / learnopengl

https://learnopengl.com
1 stars 0 forks source link

Get rid of map_pbr logic #52

Open kikonen opened 2 months ago

kikonen commented 2 months ago

Relatesd to channel texture logic (#38), discard map_pbr logic.

Logic seemed approriate but is falling very badly due to mismatches in channel texture mapping. Also various lot of obcure exclusion and file name mapping matches must be done.

=> Thus better to discard logic => possibly add "path_prefix" into material reducing typing effort of paths (however, that causes issues in copy/paste of code, so not necessarily good thing => better to put focus into implementing prefab logic (#35), to allow typing to be done only once in prefab, not separately on each scene file (assuming sharing of prefabs works)

kikonen commented 1 month ago

Analysis' Instead of getting rid of it, change logic so that "xxx_pbr" is defined as separate yaml file

Thus alllow encapsulating texture mapping for re-use.

      material:
        map_kd: skeleton_pbr/Skeleton_Body_AlbedoTransparency.png
        map_normal: skeleton_pbr/Skeleton_Body_Normal.png
        map_channel:
          - path: skeleton_pbr/Skeleton_Body_MetallicSmoothness.png
            type: metallness_map
            channel: xxxR

i.e. this allows reaching main goal of "xxx_pbr" logic, reuse and avoid typing same texture mappings multiple times