set ‘type: FloatType’ as default for EffectComposer

Is your feature request related to a problem? Please describe.

So Effect composer uses “type :UnsignedByteType. ” by default and this causes color banding issues when LinearToSRGB conversion is done by gammaCorrectiion shader.

Describe the solution you’d like

As seen in adding type: FloatType in the effecComposer.js file fixes this issue

Describe alternatives you’ve considered

Making a renderTarget with parameters as :
var parameters = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat, stencilBuffer: false, type:FloarType };

also works

Additional context

This parameter is also applicable in the webgl2_multisampled_renderbuffers as type:FloarType is not set in the example and you will have banding issues if you try LinearToSRGB in any of the passes

1 possible answer(s) on “set ‘type: FloatType’ as default for EffectComposer

  1. The problem is that not all use cases require floating point textures so the existing UnsignedByteType is probably the better default. Especially since floating point textures are much more expensive and don’t work on every device.