I haz a pixelshader (and this is a blogpost)
Posted: 08 Dec 2011, 07:36
Actually I have no idea how this happend, seeing how I just woke up, brushed my teeth, and made this between 2 bowls of cereal.

different, bigger image png blabla
It looks excactly like the placeholder loadscreens I was using which is just great and seems to be easy on cpu.

Basically just wanted to collect some links forlater never reading and looked at the blur shader of zeroK and outline widgt and did not understand what was going on.
Then I searched forum for "screencopy" which in hindsight does not even make sense since it is just a arbitrarily chosen name.
First result:
So got that obama shader from Evil4Zerggin, from whose thread the result was.
changed glTexRect(0,vsy,vsx,0) to glTexRect(500,vsy,vsx,0)
and it was only rendering the shader on half the screen.
aha.
Looked at the code of the shader and appearently you just change frag_Color to something and it gets used for that pixel?

Then blue and red and black screeens.
After that, making the actual shader was easy:
It also pixelizes some stuff it shoudnt, like selection rectangles but I guess that is just a matter of finding the correct widget:DrawPrexxxx variante.
Gotta get down to the bus stop.
tl;dr
Spring now looks like it is from 1997.

Thanks to Evil4Zerggin for posting his shader example!
Seems like a good base to experiment with.

different, bigger image png blabla
It looks excactly like the placeholder loadscreens I was using which is just great and seems to be easy on cpu.

Basically just wanted to collect some links for
Then I searched forum for "screencopy" which in hindsight does not even make sense since it is just a arbitrarily chosen name.
First result:
So that that is how this works.Even cruder--screencopy to texture -> TexRect with shader.
So got that obama shader from Evil4Zerggin, from whose thread the result was.
changed glTexRect(0,vsy,vsx,0) to glTexRect(500,vsy,vsx,0)
and it was only rendering the shader on half the screen.

Looked at the code of the shader and appearently you just change frag_Color to something and it gets used for that pixel?

Then blue and red and black screeens.
After that, making the actual shader was easy:
Code: Select all
local fragmentShaderSource = [[
uniform sampler2D screencopy;
void main() {
int pixzelSize = 10; //why cant this be rand() % 10
float pixelx = pixzelSize/1600.0f; // ***get real up in this bitch
float pixely = pixzelSize/1200.0f;
vec2 texCoord = vec2(pixelx*int(gl_TexCoord[0].x/pixelx), pixely*int(gl_TexCoord[0].y/pixely));
gl_FragColor = texture2D(screencopy, texCoord);
}
]]
Gotta get down to the bus stop.
tl;dr
Spring now looks like it is from 1997.

Thanks to Evil4Zerggin for posting his shader example!
Seems like a good base to experiment with.