Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for customizable colors on models that support it, by adding a new API
For a model to support it, it should have textures:
diffuse_base
diffuse_color1
diffuse_color2
diffuse_color3
Then on this model, the
diffuse_base
is replaced by a texture computed as follows:on a transparent canvas, I first draw the original unmodified
diffuse_base
. Then on top of it, I drawdiffuse_color1
colored by color1, thendiffuse_color2
colored by color2 etc.More generally, this PR prepares code to support any customizable texture based on the naming scheme
XXX_base
,XXX_color1
,XXX_color2
etc.