Having difficulty trying to apply a shader to the entire Camera View port or entire Canvas.
For example rendering a Radial Blur or Bloom to encompass everything on screen or “within camera bounds.”
EDIT: I see PostEffect in Mojo3D but not in Mojo2D. xD
This doesn’t directly answer your question, but may help:
To do what you want, just create an image canvas with the associated shader, then draw to that canvas, flush it and draw that image into the “main” canvas.
If I have time later I can make a little example.
Yeah I was looking at your examples yesterday. I think I can try something, but I’m sure one more example won’t hurt. Learning lots from these thank you!
The shader is kinda heavy, though. May not run at 60fps at high resolutions. Dialing the blur samples down speeds things up.
Yo, that’s really beautiful. Genius. What resources did you find to learn how to write these? I’m interested in getting down the basics.
The GL shading language itself is not that hard, you can learn most of what you need by reading this and doing the exercises directly in the web page: https://thebookofshaders.com
The difficult part for me was understanding how it connects to Monkey2 and Mojo, and it took a lot of trial an error. That’s why I put together those examples, so that people trying the same would find it easier.
However, those are all 2D. I still haven’t successfully made a 3D material with its own shader, although I haven’t tried recently.
Thanks so much. 😉
You must be logged in to reply to this topic.
Monkey2 is an easy to use, cross platform, games oriented programming language from Blitz Research.