I have a glowing object(point light attached to a ball with a default shader with the emission property) in my scene and I've added a script to make the point light flicker. The script randomly changes the intensity of the point light to make it flicker. Since I'm using an emission shader the ball does can also be seen without light. I'm using HDR values in my emission shader and by changing the Value in the HSV Color picker I can change the color of the ball to black.

I need help in linking the value of the HSV color on the emission shader of the ball to the intensity of the point light.

Any help would be useful! Thanks!



material.SetColor ("_Color", myColor)


material.SetColor ("_TintColor", myColor);

That changes the values directly on the shader material. I hope that helps!

  • \$\begingroup\$ It does but I need to change the V of the HSV without changing the Hue or Saturation. Thanks though! \$\endgroup\$ – user3927312 Jan 27 '16 at 21:20
  • \$\begingroup\$ Have you tried setting the alpha for the second parameter? Ex: material.SetColor("_Color", new Color(0.5f, 0.6f, 0.7f,0.8f)); @user3927312 \$\endgroup\$ – andeart Jan 28 '16 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.