applyDisplacementMap with uvScale Vector

Hello everybody,

I am trying to use applyDisplacementMap function with an uvScale vector2 but I can’t make it work
(Mesh - Babylon.js Documentation)

From the former forum I read that this is supposed to allow us to have a displacement working as a classic texture with uvScale.

Here is a playground for test purpose, whatever the values I put in uvScale Vector2, the sphere doesn’t change: https://www.babylonjs-playground.com/#04JDPF#9

Thanks for your help! :wink:

Let me check :slight_smile:

hum hum…

Looks like someone forgot to use new keyword:

sphere.applyDisplacementMap("/playground/textures/amiga.jpg", 0, 1.5, null, new BABYLON.Vector2(0, 0), new BABYLON.Vector2(10, 10));
1 Like

:joy: This is not my day! I should better go to bed.

So that you forgive me, I made that small animation using applyDisplacementMap:
https://www.babylonjs-playground.com/#04JDPF#14

1 Like

lol no worries