-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
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:
export const EffectComposer = memo(
forwardRef<EffectComposerImpl, EffectComposerProps>(
(
{
...,
RenderPass = RenderPass
},
ref
) => {
...
const [composer, normalPass, downSamplingPass] = useMemo(() => {
...
// Add render pass
effectComposer.addPass(new RenderPass(scene, camera))
...
}, [
...,
RenderPass
])
...
}
)
)
I'd like to hear your opinion.
Metadata
Metadata
Assignees
Labels
No labels