Can the bumpmap texture be combined into a single channel?

This question is similar, but not the same as: PBR from one image - #23 by mrdoob

In my app, I am using dynamic textures where shapes are drawn on a 2d canvas and then moved to a webgl texture. At the moment, I need three canvases - one for color, one for metal/roughness and one for bump. If bump could occupy the other channel in the metal/roughness canvas it would save the need for another hi-res canvas and speed up texture copying by 50% by removing one of the canvases. The app has acceptable performance as it is, but it feels like it is on the edge of being a bit too slow. A 50% boost in image movement would make it a bit more snappy.

It seems that the bump map could just occupy a single color channel - is there a reason why it needs to be gray? Could I create a custom shader to handle a bump map that just uses a single channel?

Thanks!

So… I just tried it and it seems to me that if I use a texture that has bump info on the red channel, it can be combined with the roughness and metalness texture that are occupying the other two channels. This looks fine to me and I am going to go forward with using this.

If this is the intended behaviour, it would be great if it was updated in the docs so that it is guaranteed to work and doesn’t get changed in a later release.

There is only a single combination of different textures which is officially supported, see PBR from one image - #2 by Mugen87

That is not necessary. If you declare the format of a texture as THREE.LuminanceFormat (or THREE.RedFormat with WebGL 2), the texture will only allocate the memory for a single color channel. I recommend you use this approach and don’t combine bump maps into different textures.