# An assortment of OSL shaders for your perusal

**URL:** <https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619>\
**Category:** General\
**Tags:** fresnel, osl\
**Created:** [May 23, 2016, 5:14pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619 "2016-05-23T17:14:40Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![sharktacos](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sharktacos](https://forums.chaos.com/u/sharktacos)\
**Post date:** [June 21, 2016, 12:34am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/81 "2016-06-21T00:34:15Z")

</div>

> What is “clothTex”?

Sorry that might be a Maya thing. Don’t know Max. At any rate, Vray has a plugin for it, so it should work in Max too. Just load it under the vray texture plugins.

---

<div class="post-metadata">

**Author:** ![sharktacos](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sharktacos](https://forums.chaos.com/u/sharktacos)\
**Post date:** [June 21, 2016, 12:39am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/82 "2016-06-21T00:39:03Z")

</div>

Here’s the DisneyBRDF (minus the BRDF part I guess). I may try to get this working in GLSL instead since you can do BRDFs there…

This works in Maya. I think Max might freakout about the getTextureDif routine, if so you can just swap that out with a result texture call.

```auto

/* artist friendly metal */
float n_min( float r )
{ return (1-r )/(1+ r ); }

float n_max( float r )
{ return (1+ sqrt ( r ))/(1- sqrt ( r )); }

float get_n ( float r , float g)
{ return n_min( r )*g + (1-g)*n_max( r ); }

float get_k2 ( float r , float n)
{ 
float nr = (n+1)*(n+1)*r-(n-1)*(n-1);
return nr/(1-r );
}

float get_r ( float n, float k)
{ return ((n-1)*(n-1)+k*k )/(( n+1)*(n+1)+k*k); }

float get_g ( float n, float k)
{
float r = get_r (n,k);
return (n_max( r)-n )/( n_max( r)-n_min( r ));
}

float AFMF ( float r , float g, float theta )
{
float _r = clamp(r ,0 ,0.99);

float n = get_n (_r ,g);
float k2 = get_k2 (_r ,n);
float c = cos ( theta );
float rs_num = n*n + k2 - 2*n*c + c*c;
float rs_den = n*n + k2 + 2*n*c + c*c;
float rs = rs_num/ rs_den ;
float rp_num = (n*n + k2)*c*c - 2*n*c + 1;
float rp_den = (n*n + k2)*c*c + 2*n*c + 1;
float rp = rp_num/ rp_den ;

return 0.5*( rs+rp );
}

//////

color getTextureDif(string texture_name, color no_texture_default_color)
{
    int channels = -1;
    if (gettextureinfo(texture_name, "channels", channels))
    {
        return texture(texture_name, u, v);
    }

    return no_texture_default_color;
}

float fresnelReflectionFactor(normal bumped_normal, float ior)
{
    float c = abs(dot(I, bumped_normal));
    float g = ior * ior - 1.0 + c * c;
    if (g > 0.0) {
        g = sqrt (g);
        float A = (g - c) / (g + c);
        float B = (c * (g + c) - 1.0) / (c * (g - c) + 1.0);
        return 0.5 * A * A * (1.0 + B * B);
    }

    return 1.0;
}

// Schlick simplified Fresnel function, non-metal/non-metal, no polarisation.
float SchlickFresnel(normal bumped_normal, float ior)
{
    float c = abs(dot(-I, bumped_normal));
    float g = (1 - ior) / (1 + ior);
    g = g * g;
    return g + (1 - g) * pow((1 - c), 5);

}

surface
DisneyBRDFMtl
[[string description = "Disney Principled BRDF Material"]]
(

    string Base_Color = "color.png",

        float Metallic_Amount = 0
    [[ string description = 
        "the metallic-ness (0 = dielectric, 1 = metallic). This is a linear blend between two
        different models. The metallic model has no diffuse component and also has a tinted incident
        specular, equal to the base color."
    ]],

    float Specular_Amount = 0.5
    [[ string description = 
        "incident specular amount. This is in lieu of an explicit index-of-refraction. 
        normalizes ior 1.0-1.8"
    ]],

    float Specular_Tint = 0
    [[ string description = 
        "a concession for artistic control that tints incident specular towards the base color.
        Grazing specular is still achromatic."
    ]],

    float Roughness = 0.5
    [[ string description = 
        "surface roughness, controls both diffuse and specular response. 
           R = roughness^2 for diffuse & (0.5 + roughness/2)^2 for spec"
    ]],

    float Anisotropic = 0
    [[ string description = 
        "degree of anisotropy. This controls the aspect ratio of the specular highlight.  
        (0 = isotropic, 1 = maximally anisotropic)."
    ]],

    float Anisotropic_Rotation = 0.5,

    float Sheen = 0
    [[ string description = 
        "an additional grazing component, primarily intended for cloth."
    ]],

    float Sheen_Tint = 0.5
    [[ string description = 
        "amount to tint sheen towards base color."
    ]],

    float Clearcoat = 0
    [[ string description = 
        "a second, special-purpose specular lobe. always isotropic and non-metallic.  
          fixed ior=1.5. Fixed roughness=0.25. Fixed GGX gamma=2. normalizes amount 0-0.25." 
    ]],

    float Clearcoat_Gloss = 1 [[ string description = 
        "controls clearcoat glossiness (0 = satin appearance, 1 = gloss appearance"
    ]],

    string Opacity = "opacity.png",
    int Reflection_Subdivs = 8,
    float Texture_Gamma = 1,

    output color result = 1
)

{
    /* Define Bump */
    normal bumped_normal = N;

    /* Diffuse */
    color OpacityColor = getTextureDif(Opacity, color(1));
    color BaseColor = getTextureDif(Base_Color, color(0.5));
    BaseColor = pow(BaseColor, Texture_Gamma);

    float Kd = 1;
//is there an amount?

   /* Specular */
    float IOR_disable = 0;
    float Tail = 2.0;
    float RoughnessGGX = 0;

    /* Spec amount - remaps ior to normalized value */
    float SpecAmount = clamp(Specular_Amount,0,1); //set min-max to 0-1
    // remapping: b1 + (s-a1)*(b2-b1)/(a2-a1)
    float IOR = 1 + SpecAmount*0.8; //in lieu of an explicit index-of-refraction. Normalizes ior 1.0-1.8
    color Fresnel = SchlickFresnel(bumped_normal, IOR); //Fresnel_Amount

    /* Spec tint */
    float SpecTintAmount = clamp(Specular_Tint,0,1); //set min-max to 0-1
    color TintColor= mix(1,BaseColor,SpecTintAmount); //mix between baseColor and white based on Specular_Tint amount
    color Tint = mix(TintColor,1,Fresnel); //mix between tintColor and white based on Fresnel
    Fresnel *= Tint; //tints incident specular towards the base color. Grazing specular is still achromatic.
    Fresnel *= Specular_Amount;

    /* Metallic */
    color BaseMetal = pow(BaseColor,2.2);
    color Edgetint = pow(BaseColor,0.2);

    float thetaB = acos(dot(-I,N));
    float RCH = AFMF(BaseMetal[0],Edgetint[0],thetaB);
    float GCH = AFMF(BaseMetal[1],Edgetint[1],thetaB);
    float BCH = AFMF(BaseMetal[2],Edgetint[2],thetaB);

    float MetallicAmount = clamp(Metallic_Amount,0,1); //set min-max to 0-1. 0 = dielectric, 1 = metallic
    Kd = 1 - MetallicAmount; //The metallic model has no diffuse component
    color Metallic = mix(BaseMetal,Edgetint,Fresnel); // Metallic has tinted incident specular, equal to the base color.
// color Metallic = color(RCH,GCH,BCH);
    color SpecColor = mix(Fresnel,Metallic,MetallicAmount); // linear blend between dielectric & metallic

    /* Anisotropy */
    float AniAmount = clamp(Anisotropic,0,1); //set min-max to 0-1
    float AniRotation = clamp(Anisotropic_Rotation,0,1); //set min-max to 0-1
    AniRotation *= 10; // not sure why this works...

    /* Define Sheen */
    float SheenAmount = clamp(Sheen,0,1); //set min-max to 0-1
    float SheenTintAmount = clamp(Sheen_Tint,0,1); //set min-max to 0-1
    float facingRatio = 1 - abs(dot(I, bumped_normal));

    SheenTintAmount *= 2; // intensify tint amount
    color TintBoost = transformc("hsl", BaseColor);
    TintBoost[2] = TintBoost[2] + 0.5; // make the tint a brighter version of the mainColor
    TintBoost[2] = clamp(TintBoost[2],0,1);
    TintBoost = transformc("hsl","rgb", TintBoost);

    color EdgeColor = color(0.25,0.25,0.25);
    color TintEdge = EdgeColor * TintBoost; //colorize sheen with the tint
    EdgeColor = mix (EdgeColor, TintEdge, SheenTintAmount); //mix between tinted & untinted sheen based on tint value
    EdgeColor = clamp (EdgeColor, 0, 1);
    color SheenMix = EdgeColor * facingRatio * SheenAmount;
    BaseColor += SheenMix;

    /* Roughness */
    float RoughnessAmount = clamp(Roughness,0,1); //set min-max to 0-1
    float DifRoughness = pow(RoughnessAmount,2);
    float SpecRoughness = RoughnessAmount; // paper uses pow((0.5 + RoughnessAmount/2),2) in BRDF

    /* diffuse */
    color BaseLess = BaseColor * 0.5; // reduce diffuse by 0.5 at grazing angles for smooth surfaces
    color BaseMore = BaseColor * 2.5; // increase diffuse by up to 2.5 at grazing angles for rough surfaces.
    color BaseEdge = mix(BaseLess,BaseMore,RoughnessAmount);
     //BaseColor = mix(BaseColor,BaseEdge,Fresnel);

    /* Clearcoat */
    float ClearcoatAmount = clamp(Clearcoat,0,1); //set min-max to 0-1
    float ClearcoatGloss = clamp(Clearcoat_Gloss,0,1); //set min-max to 0-1
    ClearcoatAmount *= 0.25; //normalizes amount 0-0.25
    float ClearIOR = 1.5; // fixed ior

    closure color difMain = BaseColor * Kd *
        diffuse(bumped_normal, "roughness", DifRoughness);

     closure color spcMain = SpecColor *
        microfacet_ggx (bumped_normal, SpecRoughness, IOR_disable,
        "gtr_gamma", Tail,
        "subdivs", Reflection_Subdivs,
        "anisotropy", AniAmount,
        "aniso_rotation", AniRotation
        );

    closure color spcClearcoat = ClearcoatAmount *
        microfacet_ggx (bumped_normal, RoughnessGGX, ClearIOR,
        "gtr_gamma", Tail,     
        "reflection_glossiness", ClearcoatGloss,
        "highlight_glossiness", ClearcoatGloss,
        "subdivs", Reflection_Subdivs
        );

    Ci = OpacityColor * difMain + spcMain + spcClearcoat + (1.0 - OpacityColor) * transparent();
    //Ci = OpacityColor * difMain + (1.0 - OpacityColor) * transparent();

}

```

---

<div class="post-metadata">

**Author:** ![Laserschwert](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Laserschwert](https://forums.chaos.com/u/Laserschwert)\
**Post date:** [June 21, 2016, 8:50am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/83 "2016-06-21T08:50:16Z")

</div>

> [@Last bucket(s) stuck in build 3.00.08](https://forums.chaos.com/t/last-bucket-s-stuck-in-build-3-00-08/51419/10):
>
> That would be tricky. I had a quick look but you’re pretty limited in OSL when it comes to looking up geometry. A shader similar to the VRayEdgesTex might be able to do that.

Maybe it might work somewhere along the lines of Photoshop’s bevel layer style, wheras the bevel edge is just a color inset, with light angles defining where the light and dark edges appear.

---

<div class="post-metadata">

**Author:** ![sharktacos](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sharktacos](https://forums.chaos.com/u/sharktacos)\
**Post date:** [June 21, 2016, 3:22pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/84 "2016-06-21T15:22:18Z")

</div>

Rens,

Luc was saying [here](http://forums.chaosgroup.com/showthread.php?87304-skin-shader-a-la-Alsurface-pleaseeee&p=693977#post693977) that he was not able to connect an OSLmtl to a blendMtl or bumpMtl in Max. This works fine for me in Maya. Can you conform whether this is working in Max too?

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [June 22, 2016, 8:49am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/85 "2016-06-22T08:49:15Z")

</div>

> [@Ideas on making V-Ray's sampling UI more intuitive.](https://forums.chaos.com/t/ideas-on-making-v-rays-sampling-ui-more-intuitive/47987/123):
>
> Rens,
> 
> Luc was saying [here](http://forums.chaosgroup.com/showthread.php?87304-skin-shader-a-la-Alsurface-pleaseeee&p=693977#post693977) that he was not able to connect an OSLmtl to a blendMtl or bumpMtl in Max. This works fine for me in Maya. Can you conform whether this is working in Max too?

Hi, I did a quick test with the archGlass material, and that seems to work fine. I only had a look in the material editor preview though, but that should give the same result.

---

<div class="post-metadata">

**Author:** ![Art48](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Art48](https://forums.chaos.com/u/Art48)\
**Post date:** [June 23, 2016, 1:31pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/86 "2016-06-23T13:31:13Z")

</div>

Another idea: convert object-space procedurals to world space procedurals.

Background:  
I got asphalt with procedural potholes. Now I wanna have stripes of paint on top, as extra object, but not where the potholes are.  
I can’t just take the potholes mask and use it, since they are object space. I could now rework all procedurals to be in world space, but a node which converts or offsets or something the procedurals in a way they are at the same position on another object would be nice.

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [June 26, 2016, 3:05pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/87 "2016-06-26T15:05:35Z")

</div>

Quick update: finished the blur shader! It’s slow as expected, but it works nicely, even with most procedurals. I’ll post that tomorrow and answer the replies here as well. : )

---

<div class="post-metadata">

**Author:** ![Art48](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Art48](https://forums.chaos.com/u/Art48)\
**Post date:** [June 27, 2016, 7:51am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/88 "2016-06-27T07:51:20Z")

</div>

> [@Shaded mode changes to rendered mode when applying materials](https://forums.chaos.com/t/shaded-mode-changes-to-rendered-mode-when-applying-materials/51511/3):
>
> Quick update: finished the blur shader! It’s slow as expected, but it works nicely, even with most procedurals. I’ll post that tomorrow and answer the replies here as well. : )

It would be interesting to know how it reacts with extreme values. You know for example the antialiasing has problems to get smooth transitions in super-high contrast areas (0 vs 10+). How does your blur shader handles this? In my head it could happen that there would still be a harsh line, with a soft glow around it, since the blur doesn’t blur so much as to make that border disappear.

---

<div class="post-metadata">

**Author:** ![Art48](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Art48](https://forums.chaos.com/u/Art48)\
**Post date:** [June 27, 2016, 9:03am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/89 "2016-06-27T09:03:58Z")

</div>

Another one:

Erode/Dilate.

Background:  
I got a noise map which is clamped already with a harsh transition/border. I want to erode that further by some amount to create kind of like an inset effect.

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [June 28, 2016, 12:28am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/90 "2016-06-28T00:28:22Z")

</div>

The page isn’t up yet, but here’s the blur map already for those interested. 🙂  
[http://www.rensheeren.com/osl/slowBlur\_tex\_v001.osl](http://www.rensheeren.com/osl/slowBlur%5C_tex%5C_v001.osl)  
(right-click, save as)

Usage:  
- Connect the texture you want to blur.  
- Adjust the scale UP until you start to see blocks, pixels or lines in your blurred texture.  
- Then adjust the scale down again to the limit where they just disappear.  
- Then set the blur size (amount of blur).  
- The falloff is an easy way to get some more blur in at the cost of it looking more blocky.  
&nbsp;&nbsp;&nbsp;&nbsp;Falloff 1 is pure Gaussian blur, 0 is close to a box blur.

The reason for the scale factor is that the blur texture has no idea of the input pixel size, so it might over or under sample, so that’s why you need to adjust the scale until you start to see blocks and lines (undersampling) in your render and then adjust down again until they disappear.

---

<div class="post-metadata">

**Author:** ![Ihno](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@Ihno](https://forums.chaos.com/u/Ihno)\
**Post date:** [June 28, 2016, 7:25am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/91 "2016-06-28T07:25:38Z")

</div>

Nice 🙂 thanks I instantly have a use for it 🙂

---

<div class="post-metadata">

**Author:** ![Art48](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Art48](https://forums.chaos.com/u/Art48)\
**Post date:** [June 29, 2016, 8:30am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/92 "2016-06-29T08:30:00Z")

</div>

Is it possible to create a universal scaling map in OSL? Like for example I created a composite map consisting of say 10 maps and I like the overall result, but I want to have it scaled down by 25%. Usually I’d have to go in each map, do the scaling/tiling. A node doing that for me with say a multiplier would be awesome. I amaware I can do this when setting up a shader with a multiplier controller, but I’d rather have it as one single node. I don’t know if it’s at all possible with OSL.

---

<div class="post-metadata">

**Author:** ![mik](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/mik/32/60425_2.png) [@mik](https://forums.chaos.com/u/mik)\
**Post date:** [June 29, 2016, 8:50am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/93 "2016-06-29T08:50:39Z")

</div>

Thanks a lot Rens!  
Very useful thanks for sharing your OSL Shaders  
Regards

---

<div class="post-metadata">

**Author:** ![Moriah](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Moriah](https://forums.chaos.com/u/Moriah)\
**Post date:** [June 29, 2016, 9:25am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/94 "2016-06-29T09:25:55Z")

</div>

That blur node works really well, but it makes the render around 3x slower with a mild blur…

---

<div class="post-metadata">

**Author:** ![Art48](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Art48](https://forums.chaos.com/u/Art48)\
**Post date:** [June 29, 2016, 10:03am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/95 "2016-06-29T10:03:06Z")

</div>

> [@Moriah](#):
>
> That blur node works really well, but it makes the render around 3x slower with a mild blur…

Pew - I expected it to be slow, but THAT slow?. I might wait this out 😛

---

<div class="post-metadata">

**Author:** ![joconnell](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/joconnell/32/36063_2.png) [@joconnell](https://forums.chaos.com/u/joconnell)\
**Post date:** [June 29, 2016, 11:29am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/96 "2016-06-29T11:29:23Z")

</div>

> [@Art48](#):
>
> Is it possible to create a universal scaling map in OSL? Like for example I created a composite map consisting of say 10 maps and I like the overall result, but I want to have it scaled down by 25%. Usually I’d have to go in each map, do the scaling/tiling. A node doing that for me with say a multiplier would be awesome. I amaware I can do this when setting up a shader with a multiplier controller, but I’d rather have it as one single node. I don’t know if it’s at all possible with OSL.

It’s not perfect for everything but there’s a uvw xform modifier that does this.

---

<div class="post-metadata">

**Author:** ![Art48](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Art48](https://forums.chaos.com/u/Art48)\
**Post date:** [June 29, 2016, 11:51am UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/97 "2016-06-29T11:51:41Z")

</div>

> [@joconnell](#):
>
> It’s not perfect for everything but there’s a uvw xform modifier that does this.

Yeah I am aware of that but it only works with bitmaps and not with procedurals (granted they are object space, not explicit mapping)

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [June 29, 2016, 3:39pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/98 "2016-06-29T15:39:16Z")

</div>

> [@Moriah](#):
>
> That blur node works really well, but it makes the render around 3x slower with a mild blur…

Well I never said it would be quick, hence the name. 😄  
But 3x seems a bit much. Did you increase the scale until you started seeing blocks and lines in the blur? However it does become exponentially slower with increasing blur size, OSL doesn’t really work well for this, so use it only where you need it.

---

<div class="post-metadata">

**Author:** ![Moriah](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Moriah](https://forums.chaos.com/u/Moriah)\
**Post date:** [June 29, 2016, 3:43pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/99 "2016-06-29T15:43:41Z")

</div>

> [@Rens](#):
>
> Well I never said it would be quick, hence the name. 😄  
> But 3x seems a bit much. Did you increase the scale until you started seeing blocks and lines in the blur? However it does become exponentially slower with increasing blur size, OSL doesn’t really work well for this, so use it only where you need it.

Yes, i followed what you said in the initial post, and it really slows down a lot if the blur size is somewhat large. Only thing i could think of where i would use this node would be with procedural stuff, still haven’t tested with them, but with a 4k map its around 3x slower, but then again with maps i would rather blur in PS.

I’m curious, where and in what situations would you guys use the blur node, taking in consideration it will be always slower than just rendering a blurred version of a map?

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [June 29, 2016, 3:46pm UTC](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619/100 "2016-06-29T15:46:39Z")

</div>

> [@Moriah](#):
>
> Yes, i followed what you said in the initial post, and it really slows down a lot if the blur size is somewhat large. Only thing i could think of where i would use this node would be with procedural stuff, still haven’t tested with them, but with a 4k map its around 3x slower, but then again with maps i would rather blur in PS.

Yep, or with the blur parameter on the bitmap node itself.

[Previous page](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619.md?page=4)

[Next page](https://forums.chaos.com/t/an-assortment-of-osl-shaders-for-your-perusal/58619.md?page=6)
