Blurring a Texture Sample

Whats the easiest way to blur a texture sample?

I’m currently using a render target texture sample to mask out some areas of my level. It works well, but in order to get the desired effect, I need to ceil the texture sample and then invert it to be used (so all pixels are either 0 or 1). Ideally I’d like to soften the edges after the ceiling of the texture sample where it goes from white to black, but how to do this seems to be escaping me. I know of Spiral Blur - Texture but that only works for a texture object and I don’t think I can use that in this case since the UV’s of the texture sample are heavily modified(?). Ideally I’m looking for something along the lines of a feather operation in photoshop, but it also needs to be fairly efficient/quick due to this being used at real time and render target updating quite frequently.

Use smoothstep function.

Tried that - but didn’t seem to do anything? I also saw Smooth Threshold which seems like something that could be used as well. How should they be used? Can’t seem to find too much information on either node.

Alright seems I was mistaken about Spiral Blur - there was a section to input UV’s. Does what it says it does, blur’s the 2d texture.

Got it to work and seems to suit my needs very well :slight_smile:

Spiral Blur is very expensive. Only use it if you *really *need to.

Is there a better option to blur the texture sample then?

You could try mip biasing it down a few or more levels.

tom looman has a nice spiral blur function that can be controlled nicely. default engine one uses 128 iterations iirc, with his you can specify the amount

Just a random suggestion: Have you tried to simply use a higher mip of the texture?