bumpTexture for mixMaterial

I was trying to add some bumpTexture in the Material mix to give more relief to the rock/mountain texture. But there is no such possibility.

This gives very smooth textures without the bump and therefore less convincing rocky mountains.

My question is could this be something that can be added as for TerrainMaterial, please @julien-moreau

Oh, really… It doesn’t exist? How disappointing. Definetely would need to have that, if you ask me.

yes, is disappointing. :slightly_smiling_face:
I’m asking you have that. :grinning:
Is this something you could add ? thanks in advance @mawa.

Hey @Dad72
The main problem is the mix material is using 8 diffuses textures today, and 2 mix textures. Most of the devices limits samplers count to 16 so here we’ll not have enough slots.

The solution would be to have another material like MixWithBumpMaterial for example but should be limited to 4 diffuse textures + 4 bump textures + 1 mix map.

@sebavan do you confirm that most of the devices limit samplers count to 16 ?

Most of them will be at 32 but some of them will be 16 cause the min webgl is 16 if I recall correctly

My bad!
But testing right now, Electron on a macbook M1 Max I can see maxTexturesImageUnits: 16
Same in Google Chrome on this macbook maxTexturesImageUnits: 16

Both tests are using WebGL 2

I didn’t know about the max number of textures.
I understand better why this has not been done.

You propose mixWithBumpMaterial, but why not improve the terrainMaterial? He almost does. It only has 3 diffuse and bump textures, why not add the 4th diffuse and bump texture to it? It might be easier to improve this one, what do you think?

1 Like

I agree @Dad72 ! So 4th texture will be the aplha of the mix map
I’ll also have to take care of backward compatibility


It’s cool if it can be possible to do like that. Thanks @julien-moreau

1 Like

Do this and become my hero :man_superhero: Well, you already are… alongside others :grin:


Ahahah I promise you that I’ll find the time to upgrade this material :slight_smile:

1 Like