Is it possible to use SSE to interact on a per-pixel basis?

Grab your favourite IDE and tinker with the innards of game engines

Is it possible to use SSE to interact on a per-pixel basis?

Postby jmoak3 on Sat Feb 01, 2014 3:44 am

I'm working on another post process effect that involves a lot of random blips. If this were one of my from-scratch projects I'd just make a pixel shader something like

Code: Select all
if (rand > 0.5f)
{
   outcolor = float3(whatever color);
}


which would look at each pixel and set it's color, but with SSE it's like you have to interact with the entire scene at once like one giant pixel.

I tried to use the custom code node and wrote the above code, and as expected it still treated the thing like a giant pixel.

Is there a way to take input on a per pixel basis, or to take in a framebuffer and go through each pixel and apply logic to it?

(Or is using a noise texture and multiplying it, rounding it, abs-ing it, adding random numbers etc until it's a nicely randomized blob and then smashing it with my framebuffer the only way to achieve this effect?)
jmoak3
Dumpling
Dumpling
 
Joined: Wed Jan 22, 2014 11:24 pm

Return to Programming

Who is online

Users browsing this forum: No registered users