Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Can I alter the location of the Kawase blur's clear/blurry areas? I know I can change the mask area for any effect. Still, the part of the blur that's clear in a Kawase blur is always in the center of the screen, no matter where the mask is, making me unable to have the clear area follow the character as the character approaches the end of the screen.

I didn't implement this to improve performance, as I didn't think it was necessary. But you could use the Depth of Field effect, which allows you to define exactly the areas where you want to blur.

How exactly do you control which part of the screen is in focus?  I've adjusted all the settings extensively and I can only ever get the whole screen to be blurred, or none.

Create a mask surface cleared with black color, them draw a white shape inside, which is the focus area. Send this surface as texture to the effect, using .SetEffectParameter(). Don't forget to enable the "Use ZDepth" parameter in the code.