Search Unity

Changing The effect of Motion Blur based on damage?

Discussion in 'Shaders' started by grobm, Jul 10, 2007.

  1. grobm

    grobm

    Joined:
    Aug 15, 2005
    Posts:
    217
    I am looking to have Motion Blur Effect change (public float blurAmount = 0.8f;) as the damage level increases for the player.

    What would be the best approach? Modify the Motion Blur effect with function to respond to a broadcast message?

    Can I use the Shader.blurAmout to change the value via Javascript, or am I going to run into performance problems?

    Thanks in Advance.
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    In my experience there's no performance hit modifing this value in JS. I'd recommend, when it falls to an imperceptible value, switching off the component for better efficiency.