CatDogEngine icon indicating copy to clipboard operation
CatDogEngine copied to clipboard

[Refact] One WorldRenderer to render meshes with different material types

Open T-rvw opened this issue 1 year ago • 0 comments
trafficstars

  1. Treat material as a generic resource. For example, MaterialComponent has many PBR parameter Get/Set methods or cartoon parameter Get/Set methods. Firstly, we should remove them and use a metadata file definition including Parameters, Textures, Render States...

  2. When using metadata material component, you can get any data by StringHash or StringName. So it is not a problem to write hardcode Get/Set methods. Cleanup codes. But you still need to write specific functions to fill uniform buffer by name as we didn't consider to add FrameGraph feature currently.

  3. About uniform buffer, you can go to design a generic uniform system. For example, uniform buffer by category : mesh, material, light, ... Every specific component may need to maintain its own uniform buffer and consider to be more efficient.

  4. Material can use different VS + FS shaders so Animation VS + PBR FS is possible. And it is better to serialize material type config from memory to disk. And load material define file to memory to present material info.

T-rvw avatar May 11 '24 10:05 T-rvw