RadialBlur - how to apply?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

RadialBlur - how to apply?

Post by darkhog »

I've found this cool RadialBlur shader online: http://www.gamerendering.com/2008/12/20 ... ur-filter/ - but I don't know how to apply it to whole screen. Can you help me?
User avatar
Kjell
Posts: 1882
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi darkhog,

You need to render your scene to a RenderTarget component and then apply the shader to that. Attached is a simple example ( the shader isn't all that cool though ).

K
Attachments
FBO.zgeproj
(2.73 KiB) Downloaded 428 times
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Post by darkhog »

OK, but how do I make it so canvasMesh and cnavas target would be used only in specified AppState? I need this effect in only one appstate and AppStates doesn't have OnBeginRenderPass...
User avatar
Kjell
Posts: 1882
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi darkhog,

There are a number of ways you can do that. You can for instance put the SetRenderTarget located in OnBeginRenderPass in a Condition component, or change the RenderTarget property of SetRenderTarget at run-time. Attached is a example using the second method.

K
Attachments
FBO.zgeproj
(7.08 KiB) Downloaded 423 times
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Post by darkhog »

Doesn't work for me, but that's most likely my fault. I'll send you project file via PM, as I don't want to reveal my demo publicly just yet.
Post Reply