Hey all,
I've been a long time looker/feedbacker, but this is my first question for the UDK gurus that frequent the forums.
I've been trying to get into the world of shaders. For the most part things have been fairly straight forward (sobel, cell-shading, etc, etc). However, I recently stumbled on to something that should be really, really easy, but is deceptively difficult.
A blur shader! All I'm trying to do is blur the screen using a custom post-process material (it's the first step of a more complicated material I'm trying to create). Attached are two images of the material network and a picture of the bizarre result. The problem lies somewhere in the implementation of the ScenePos node. Before you ask, ScreenAlign is set to true on every SceneTexture and ScreenPos.
As a test, I plugged just a ScreenPos (RG only) into the back of a SceneTeture node and got the exact same result when that went straight into the emissive.
Also, as a second, less important question what do SceneDepth nodes actually calculate? It's not Depth...I suspect it's severe colour changes?
Thanks for your time.
P.S. How do I embed these pictures?
Replies
http://www.polycount.com/forum/showthread.php?t=75437
I have another issue now though...it flickers. I changed my shader to better reflect my intended end result, which is a sort of impressionist painting effect. Essentially what this does is take the pixels with (2,1),(1,1),(0,1),(1,0),(2,0) offsets and paints the current pixel the colour of the highest value found (custom nodes are used to find a max value).
This causes it to flicker. My guess would be that certain pixels are being changed, which is then changing the pixels around it the next time around, since the samples are never kept the same. Is there a way to only sample the raw scene texture each frame, without the post process from the previous frame interfering?
Still curious about the scenedepth node.
Opposed to this, the alpha output of the scene texture node returns the inverted scene depth within 0-1 range. It also requires less instructions.
This makes it seem like it doesn't actually output only depth. Maybe I've done something incredibly wrong.
This flickering issue is a real problem. It almost makes a grid shape through the material. Has anybody experienced anything like that before?
Somehow this section of the material is causing the issue. If I put a negative number or a large (abs) number into those constant 2s it gets significantly worse.