However I have multiple renderers in a scene which are all affected, such as an Orientation Cube. Ideally I’d like to be able to target the pass to a single renderer. Even with looking at the source code I don’t seem to be able to find a hook that works though.
Hello!
Render passes are given to the render window (the view)
The render window contains renderers, so the render pass can filter the right renderers
For example in the vtkForwardPass, the traverse function iterates over all renderers:
Eventually fixed it up by extending the vtkForwardPass twice and modifying the renderers/layers to focus each pass where I wanted it to apply. Then just put each pass on the view in sequence. Worked a treat, thank you again!
let pass0: Conv2DPass = renderer0Only.newInstance()
let pass1: Conv2DPass = renderer0Plus.newInstance()
if (state.conv != null) {
if (state.conv.gaussianBlur)
pass0 = applyPass(gaussianBlurPass, pass0)
pass0 = applyPass(getMaskPass(state.conv.enhancement), pass0)
}
this.view.setRenderPasses([pass0, pass1])