0

I would like to simulate a real life projector that acts as a spotLigt, with a tinted texture.

The spotlight cookie property only affects the intensity of the light and not the color, while the Projector shader has no shadows.

Do I have to implement my own projector shader, if so how? Or is there a way to attach a texture to a spotLight that also tints the colors of it?

(this is Unity 5.3)

zalavari
  • 819
  • 9
  • 21

1 Answers1

0

You could use both of them pointing at the same direction. You also need to add a square cookie to the Light.

  • the problem is that the projector lits the bacface of the objects and not casting shadows. If both the light component and a Projector component is attached, it's still the same unfortunately. – zalavari May 21 '16 at 16:32
  • I have figured this out and you are right. Except one thing is missing. The Projector component could be attached to a spotlight, and the shader has to be set to multiply. This way it seem to be working perfectly. – zalavari Jun 01 '16 at 07:31
  • so it does work with the multiply projection shader, when there are no other lights in the scene. when I add other lights the multiplication cancels out their light as well. – zalavari Jun 01 '16 at 07:48
  • If you use a different gameobject for the projector and the spotlight, but still facing the same direction, is the problem persist? – Tamás Szobonya Jun 01 '16 at 18:15
  • Projector component does not work as a real projector, its only a kind of texture projection. It should act as a ligthsource with varying colors. What I am actually looking for probably is a colored light cookie but its only working with the alhpa channel. My current idea is to have 3 spotlightts for red green and blue, and use the rgb texture channels seperately. But I thought it would be easier – zalavari Jun 01 '16 at 21:15