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 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()
.Light({phonge:1.5,direction:'vec3(100.)',normal:BABYLONX.Normals.Flat})
.InLine('float l1 = length(result.xyz);')
.Map({ path:'/textures/ground.jpg' })
.InLine('result = vec4(result.xyz*max(.2,l1),1.);')
.BuildMaterial(scene);