• Welcome to Dark Bit Factory & Gravity.
 

Pixel Shader Question

Started by spathi, August 26, 2013

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spathi

Gents,

How difficult would it be to write a shader that does simple per-pixel coloring operations based on previous colors of that pixel?

Is that one of the things that borders on impossible for shaders to do?  Can pixels keep track of their states?

Voltage

The pixel shader knows nothing of previous state as you mention.... but you can save that state into a texture, and read from the texture in the next frame.

For example:

http://glsl.heroku.com/e#424.12
Challenge Trophies Won:

spathi

Thank you, kind sir.

Do you have any further information on doing shader operations on video?

ryt

You could probably achieve some results with alpha blending.

Raizor

Quote from: spathi on August 26, 2013
Thank you, kind sir.

Do you have any further information on doing shader operations on video?

Shadertoy supports video processing, so it's certainly possible. There are quite a few examples on there of a Brittney Spears video with various post processing effects. It's not something I've ever tried personally, but I can certainly see that it would be pretty fun to play with :)
raizor

Challenge Trophies Won: