I've been trying MRT with EffectComposer in order to avoid additional render passes to output normals, masks, and so on. Extensibility is always a problem with pure components, but in this case, having a RenderPass prop in EffectComposer to accept a class implementing the same interface as RenderPass would allow us to use a custom render pass. Otherwise, and this is my current workaround, we must maintain a modified copy of EffectComposer, which is suboptimal in terms of maintainability.
Like:
exportconstEffectComposer=memo(forwardRef<EffectComposerImpl,EffectComposerProps>(({
...,
RenderPass =RenderPass},ref)=>{
...
const[composer,normalPass,downSamplingPass]=useMemo(()=>{
...
// Add render passeffectComposer.addPass(newRenderPass(scene,camera))...},[
...,RenderPass])...}))I'd like to hear your opinion.
I've been trying MRT with
EffectComposerin order to avoid additional render passes to output normals, masks, and so on. Extensibility is always a problem with pure components, but in this case, having aRenderPassprop inEffectComposerto accept a class implementing the same interface asRenderPasswould allow us to use a custom render pass. Otherwise, and this is my current workaround, we must maintain a modified copy ofEffectComposer, which is suboptimal in terms of maintainability.Like:
I'd like to hear your opinion.