I’m working on a biome system, and ideally I’d like to be able to change the material on certain parts of my landscape if there are trees present. I had thought of possibly using decals, but I feel like this may create a performance hit if I’ve got many decals.
Are there other methods of manipulating a layer mask at runtime to reveal (or not) certain material attributes?
Hate to be the bearer of bad news, but decal cost doesn’t show up in ShaderComplexity. ShaderComplexity actually only shows material cost + translucent overdraw cost. Overhead from various features like lighting, shadowing, post process and decals are not reflected.
Decals cost similarly to an unshadowed Movable or Stationary light, because they are both applied in a deferred pass. Covering the entire ground with them should have a pretty heavy cost, especially as you look at an angle where you are looking through potentially hundreds of them. GPU costs such as this can be seen with ‘profilegpu’, so to a performance test. Decals are under PostProcessDeferredDecals.
Thank you for the info, this is helpful. Hmm, I think another method that could be less expensive for what I’m trying to do would be to somehow manipulate a splat map or alpha map inside the shader, though I’m not sure if there’s anything exposed in the editor that might let me accomplish this.
It’s still way faster than forward. Remember, a light cost in deferred is far cheaper than a light cost in traditional forward rendering, at least for overlapping lights.
That being said, for this sort of thing specifically virtualized textures are going to be the biggest win. Totally unlimited stamping and decalling and anything else you can imagine at the cost of HDD/Install size. You don’t even need to go for an entirely unique world texture set ala RAGE, it’s perfectly doable in a kind of instanced manner. Don’t know why it’s not the hot ticket item still, the only implementation of such I’ve seen in a shipping game is the last two Trials games.
Interesting, so with virtual textures now for example in ue5, decals can be used easily now without much performance cost?
I am thinking of having decals from trim textures or atlas textures so they use like one or 2 materials for the whole project and they would be a lot of decals used all over. Since the number of materials are low, would this still be a problem?