You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate a simple colour palette texture to replace multiple materials in merged geometries. With some simple UV mapping you map entire sections of a merged geometry to single pixels on a texture. This results in a single draw call for that geometry instead of n draw calls for n colours.
This could also be applied to instanced items to keep the number of unique materials to one. Although the benefits become less noticeable.
Suggested solution 💡
Based on the colours found in a merged geometry generate a small texture with a resolution of 1 x (unique colours) and UV map items to pixels in this texture. Additional pixel padding might be needed.
Alternative ⛕
No response
Additional context ☝️
This approach can be found in many 2D games where a larger texture atlas is used for many sprites. Resulting in fewer draw calls.
This is a great idea, but would also make the library more complex. Streaming should already give us decent performance, even with bigger models. We'll leave this for now and keep this in mind as a resort to come back to if draw calls become an issue in the future
Description 📝
Generate a simple colour palette texture to replace multiple materials in merged geometries. With some simple UV mapping you map entire sections of a merged geometry to single pixels on a texture. This results in a single draw call for that geometry instead of n draw calls for n colours.
This could also be applied to instanced items to keep the number of unique materials to one. Although the benefits become less noticeable.
Suggested solution 💡
Based on the colours found in a merged geometry generate a small texture with a resolution of 1 x (unique colours) and UV map items to pixels in this texture. Additional pixel padding might be needed.
Alternative ⛕
No response
Additional context ☝️
This approach can be found in many 2D games where a larger texture atlas is used for many sprites. Resulting in fewer draw calls.
Example texture atlas:
Validations ✅
The text was updated successfully, but these errors were encountered: