Hello, I would like to get a blurred vignette like this :
It’s a post process material that I can’t do
Thanks
Hello, I would like to get a blurred vignette like this :
It’s a post process material that I can’t do
Thanks
Hey there @Alexdeez! Welcome back to the community! Did you need help with making the post processing material or did you need another way because you couldn’t use a post processing material? If you needed help with it, here’s an example of a radial gradient blur with a custom blur node from the community:
Here’s the code for the custom blur node:
float3 res = 0;
//new - get invSize from here
float2 invSize = View.ViewSizeAndInvSize.zw;
//new - we need to fix uv coordinates like this (still seems to be a bug in 4.21)
uv = ViewportUVToSceneTextureUV(uv,14);
int TexIndex = 14;
float weights[] = { 0.01, 0.02, 0.04, 0.02, 0.01, 0.02, 0.04, 0.08, 0.04, 0.02, 0.04, 0.08, 0.16, 0.08, 0.04, 0.02, 0.04, 0.08, 0.04, 0.02, 0.01, 0.02, 0.04, 0.02, 0.01};
float offsets[] = { -4, -2, 0, 4, 2 };
if(Mask <= 0.01) return SceneTextureLookup(uv, TexIndex, false);
uv *= 0.5;
for (int i = 0; i < 5; ++i)
{
float v = uv.y + offsets[i] * invSize.y * Mask * BlurStrength;
int temp = i * 5;
for (int j = 0; j < 5; ++j)
{
float u = uv.x + offsets[j] * invSize.x * Mask * BlurStrength;
float2 uvShifted = uv + float2(u, v);
float weight = weights[temp + j];
float3 tex = SceneTextureLookup(uvShifted, TexIndex, false);
res += tex * weight;
}
}
return float4(res, 1);
@Alexdeez double check if you didn’t misspell “BlurStrength” as “BlurStrenght” inside of the custom node parameters. I’m guessing you may have switched up the t & h somewhere, creating a new parameter.
Please give the solution to SuportiveEntity. I just pointed out a typo in the code that happened probably by accident.
He offered the solution itself
Yes sorry i have missclicked
Just to verify, Raven’s suggestion worked out for you and everything is working now right?