Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
T-rvw opened this issue May 11, 2024 · 0 comments
Open

Comments

@T-rvw
Copy link
Contributor

T-rvw commented May 11, 2024

  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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant