Hi!
I’m looking for a simple blur shader which can blur the grabpass. I’ve been searching for two days but i couldn’t find any usable shader.
I hardly believe that nobody have created this simple shader yet.
I would really appreciate any help. Thanks.
Third result in Google: ana-todor.ro
As I said I’ve been searching for two days. Obviously I found it and tried it. Not working in Unity 4 dx11. But I’ll try to repair that code in order to fits my needs. :neutral:
Thanks.
Hello there, I’m the one who created the shader. I just saw your message here and wanted to specify some more details about it: the warning you get on it has nothing to do with the fact that the texture isn’t rendering. The reason for which you are seeing the default pink shader is because my shader uses the GrabPass for taking the image behind it. GrabPass internally uses RenderTextures, which are a Unity Pro feature. So unless you have Unity Pro, I’m afraid you will not be able to use this shader. I’ll try to look into a workaround for this, but I’m pretty sure there is none.
I think Pro features are poorly signalled by the editor. It would be nice if Unity threw up explicit warnings when RenderTextures aren’t supported by the current license. I wrote the shader myself when i had the trial version of unity pro running and when only observed this when my license expired.
That package is kind of a mess. Aside from the helper scripts not compiling, the shader…
- …doesn’t implement a separable gaussian blur like the article says. Instead, it attempts kludge the two 1-dimensional blurs together by sampling along the four diagonals, resulting in spiky artifacts at every edge.
- …doesn’t work properly in OpenGL because it flips the Y coordinate without checking UNITY_UV_STARTS_AT_TOP.
- …generates warnings in D3D11 because it initializes a half4 with a single 0.
- …repeats the mistake of the referenced post on Game Rendering of using weights that do not sum to 1.0. This results in the blurred image being darker than the original.
Unfortunately, I don’t have anything constructive to contribute to this topic because I’m not sure how to go about using multiple buffers when a GrabPass is involved. This is the approach used by Unity’s multi-pass 4-tap blur postprocess effect, and you would need at least one intermediate buffer to perform a separable blur in each dimension.
Shader doesn’t work in Unity 4 even with Pro (trial).
Pink material. Only error thrown is “Material doesn’t have a float or range property ‘_blurSizeXY’”
I guess it is not compiling properly, but I don’t know why.
Any solution ? it seems that the package is a bit controversial.
We got it working with some edits but as Daniel mentioned there are artefacts and the resulting image does not look like a real blur, the result not being suitable for our purposes.
I changed this:
#ifndef SHADER_API_D3D11
#pragma target 3.0
#else
#pragma target 4.0
#endif
to just this:
#pragma target 3.0
And it worked :).
Hi,
As a side note, pragma target 4.0 does not work with macs.