Vertex Painting Shader cost on VR

Hi!

Im looking for some insights on a vertex paint based shader in VR.

Just wanna know how much does it cost in VR.

Is that a proper way, performance wise, to add variation to a level?

What kind of measures and cares do i have to take to have the shader appropiate for VR.

Im talking here purely on texture blending, no material blending.

Thanks.

Just to clarify, do you mean vertex color? Show untextured meshes with the vertex color determining the mesh color?

The cost of vertex colour is very cheap. Unlike textures where you have to do a lookup, you only have to send the data to the GPU memory. Accessing the memory happens even if you dont use it so it is practically free.

If you want to blend vertex colours you have to do it manually I think and then the cost might be slightly higher depending on your implementation.

HTH

Yes, because the cost of accessing it is the same. Basically free. What you do with it will have its own cost. If you use it to lerp colours the lerp cost will be added. It depends on how you use it, but the node itself is cheap.

Yeah, the vertex color node on the shader editor that allows you to use the vertex color info of your model, whether you imported it from your 3d pack or painted it directly using the brush in Unreal.

Ok, that helps a lot, but the idea is to give the artist the ability to paint vertex colors in order to change certain aspects of the model using a mask.

Example. Use the vertex color info as blending parametros to multiply a predifined mask by the roughness, in order to introduce variation throughout the level.

The shader i have in mind have the Base Color, a packed Metallic/Roughness/AO and a normal, plus a packed 512x512 mask (a different mask in each channel) used as a default (artist only can change uv tiling), and that mask multiply the other textures using the vertex color as blending information.

Does that make sense in virtue of your answero?

Thanks.

So the idea is to keep math operations at bay, right? What would you recommend to keep that kind of shader light? having in mind that the goal is to have just one Master Material that would be instanced for all the Static meshes for a VR game.

Thanks, you are helping me a lot.

The less math you do the better for the performance.

There are really nothing much you can do to make it light as you have to do what you have to do. The only thing I can say is:

  • Make sure you dont have too many options in one material. The fewer parameters the better.
  • Blending based on vertex colour is fine, and you can even let the textures be parameters, but keep the number as low as you can.
  • Try to avoid using translucency
  • Depending on the accuracy you want, think about doing the calulations in the vertex shader.

If you feel your question has been sufficiently answered, please mark the answer as correct. Good luck!

Awesome!

Could you be so kind to handle me a reference on how to do the last one? some introductory material i can start with.

I promise no more questions hahahahah

Thanks.

Thanks a .lot!