Pre-processing GLSL 2D filters?

Hi! Is there a way to make Pre-processing GLSL 2D filters? (Render the filter before the scene)


You can use some photo editor (gimp supports glsl I think) to compile and make a texture out of your shader and then mix it with your shader with your desired blending method. Though I’m not sure if you can pass textures to 2d filters via properies …

Hi! I’m not sure to understand. I was thinking about the shadertoy ocean 2D filter. My aim was to first render the ocean and then add an island (a solid island, a mesh) for example. You see the idea? (I don’t know if it’s possible to pass textures to 2D filters. Never seen it before). (Ocean with mouselook and ZSQD to move)


I guess you could use an underlay scene, put the ocean shader on that scene, then add the island to the main scene. The udnerlay scene and shader would be drawn beneath the island… But when I’ve tired this there’s quite a bit of a delay between movement in the main scene and any copied movement in the underlay scene.

Hi! Yes, good idea! Could you share your test file? Thanks!

EDIT: There are some few corrections about camera movements. But with a bit more work, I think I could get something nice…

Ensure the cameras of both scenes receive the information of the same frame. That means you never move or turn the camera directly. Better move and turn an invisible helper (can be an inactive camera) and copy from the transformation of that object to the active cameras.
See this demo that that shows it even works on scenes with dynamic relation