Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

Try

material.SetColor ("_Color", myColor)

or

material.SetColor ("_TintColor", myColor);

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

share|improve this answer
    
It does but I need to change the V of the HSV without changing the Hue or Saturation. Thanks though! – user3927312 Jan 27 at 21:20
    
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 – andeart Jan 28 at 20:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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