We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a question about something we're all familiar with, which is anti-aliasing.
That is post processing anti-aliasing , don't confuse it with no render-time MSAA kind of thing,
Just a flat picture of pixels(or texels), no vertices or anything is what I mean, and running the same function on every one of them.
The fragments has to know their positions on screen and from that information be able to map it to a color in some "shared storage" and also be able to lookup neighboring pixels colors from it..
And this is very important persistent storage, or at least some way to keep working where it left of next frame, maybe writing over the texture, array, buffer or whatever I'm very new to GLSL as you might understand...
So the output on screen gets blurrier and blurrier as time go by, rather than a static single-pass processed picture as if the shader was starting over from the same unprocessed input every frame.
And not because you doing incrementally more work/passes every frame, but because what the shader is working on is "persistent" even after it's shown on screen.
So why would I wan't to do this?
Well it's not the most exciting thing, but it's something I could learn something from and tweak to do exciting things if it works.
And if it's impossible to do this with GLSL then I can leave any thoughts about endevours in it aside.
Answers
I tried following a guide just doing the simplest thing but I don't get it to even do anything but a gradient.
First it was complaining about u_time and u_mouse not being used so I tricked it into stop complaining about that as such.. + min(0.0, max(0.0, u_time + u_mouse.x));
But then instead it complained about...
Which looks very cryptic and when I googled it, I got answers saying it's old drivers.
And I do have just inbuilt graphics on an old motherboard so that could be the issue, but it could also be me doing something wrong as I have no idea what I'm doing when it comes to shaders.
Anyways it seems like it did some transformation of the screen in GPU.. As the Y-coordinate is reversed from the processing canvas, which it's supposed to be.
That's a good sign, the upside down thing is no problem.
The problem is if I move my mouse the picture doesn't move, so it seems like it stopped after the error.
Can someone run the sketch and tell me if it works for you, or if not what error you got?
In data folder...
logo.jpg
shader.frag
I'm taking babystep and I made it do something aa-like
The OpenGL error 1282 at bot endDraw(): invalid operation error still persists though..
I changed shader.frag like so...
now how do I make it do multiple passes without loops?
just keep the processed image in storage and do one pass per frame