How to turn a material black and white

Hey there, I have a setup where I am using images as textures on a plane mesh. I’d like to know how I can show some of these in black and white to indicate to user that they are disabled.

the most efficient would be to switch the texture and have two version of them.

One could be created in a renderTargetTexture with the use of the blackAndWhite postProcess.

1 Like

Thanks @sebavan Been reading about render target and trying to find ways of doing this but still haven’t found a way to make it work. Is there an example I could follow somewhere on the playground of something similar just to get an understanding of this, as I can see BABYLON.BlackAndWhitePostProcess is on camera.

This would be the easiest and more controllable: https://playground.babylonjs.com/#DXARSP#78

2 Likes

I get this error GL_INVALID_FRAMEBUFFER_OPERATION: Draw framebuffer is incomplete when I try to use the bw effect on a mesh.

now it works thanks

1 Like