Shader performance - visual mat vs standard/orm

Godot Version

4.x

Question

Is there a performance best practice difference between using a single fairly simple visual shader and multiple shader materials that adjust a few parameters (like color) and using different standard or ORM materials that also vary by the same parameters? Assuming all textures are the same, and the variance is just albedo color, for example.

I ask because Unreal had Material Instances that were an improvement when you were sharing a set of textures and changing only simple parameters.

For example, if making 10 chairs that are identical save for the color of the chair, determined by the albedo->color.

My testing hasn’t been able to show any noticeable difference so far, but I’d like to know if there’s an actual best practice.

Technically speaking a Visual Shader only adjusting color or one parameter would probably have better performance than a StandardMaterial. However, this can get different once it becomes more complex. Usually though a custom shader is better for performance as you only use what you need. If you then want to optimize that visual shader further you can write it as a text shader file.
This is all theoretical though and it’s best if you first develop your game and optimize it later as needed (obviously you should always just use what you need for more complex projects that will need every gain they can need)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.