-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
Hi,
I just finished a GodrayPass for Wagner, but I encounter some weird stuff with the renderer.clear and the toTexture.
@composer.renderer.autoClear = false
@composer.renderer.setClearColor(0x333333,1)
@composer.reset()
@composer.renderer.clear()
@composer.render(@occlusion.scene, @camera)
@composer.toTexture(@occlusion.texture)
@godrayPass.params.occlusionTexture = @occlusion.texture
@composer.pass( @godrayPass )
@composer.toTexture(@occlusion.texture)
# Force to render to another texture here
@composer.toTexture(@occlusion.texture2)
@composer.reset()
@composer.renderer.clear()
@composer.render(@scene, @camera)
@blendPass.params.tInput2 = @occlusion.texture
@composer.pass(@blendPass)
@composer.toScreen()
After rendering the occlusionScene + the godray pass I want to blend so I needed to reset / clear / draw the scene but the clear will also clear the latest texture used in composer.toTexture.
To fixed it, I used a second texture so the first one is not clear.. but I'm sure there is a better way wihout this extra renderer.
see the screenshot below where texture & texture2 are render on 2 plane for debugging :
Let me know if I miss something!
Metadata
Metadata
Assignees
Labels
No labels
