Adding Babylonx shader removes animation

I’m trying to fix a smoothing issue I have with my model that is animated with bones. So I found a nice shader script from NasimiAsl that could fix this problem. See below. (I don’t really understand it. But he sais it works :wink: Can’t check the playground however because the babylonx.js is not loading.
The issue that I encounter now is that when I apply the shader all animations are immediately removed.
Does anyone have some experience with this?

mesh.material = new BABYLONX.ShaderBuilder()
        .InLine('float l1 = length(;')
		.Map({ path:'/textures/ground.jpg' })
		.InLine('result = vec4(*max(.2,l1),1.);')

Bone animations are performed in the gpu by the vertex shader. You might try forcing this to be done on the cpu. Think the setting done in mesh, since vertex data is changed.

yes, thank you!
I found:
mesh.computeBonesUsingShaders = false;
that works!

1 Like