Loading...
Logo
Processing Forum
Hi
I would like to use the fisheye filter out of glgraphics (shown in the fisheye example from the lib).
I want to do some projections on several spheres in parallel and that works great in general.
But I would like to change the colour of the background outside of the fisheye part of the image.
This is now black and I did not find a way to change that - probably I am just blind for a simple way ?
Thnx
knut

Replies(2)

It's in the fishEye.glsl
Copy code
  1.   if (l > 1.0) {
  2.     gl_FragColor = vec4(0, 0, 0, 1); // this line is the normalized color rgba (now opaque black)
  3.   } else {
And by normalized I mean it's in the 0 to 1 range, instead of the 0 to 255 range.

So for example green would be (0, 1, 0, 1).

Thnx a lot. I looked into that but I am really a newcomer to glsl, so I saw it but did not understand.