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

Modular shaders #73

Closed
cochrane opened this issue Jun 23, 2013 · 2 comments
Closed

Modular shaders #73

cochrane opened this issue Jun 23, 2013 · 2 comments

Comments

@cochrane
Copy link
Owner

Currently there is a lot of code duplication between all shaders. That is annoying from a maintenance point of view and must be reduced.

Instead, implement a modular system where there is one template shader, and the different parts of the template (e.g. "get diffuse color", "get normal" and so on) are instantiated in different ways as needed. The different parts of the template will probably be function calls that get implemented by various shaders; the resulting shader is generated by linking the right versions together.

This is a prerequisite for #56.

@cochrane
Copy link
Owner Author

Basically done but not yet used for OBJ

@cochrane
Copy link
Owner Author

Done along with the Metal port.

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

No branches or pull requests

1 participant