Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Im stuck on the projected light shader. How do I start?

light projected shader stuck
0
Posted

Im stuck on the projected light shader. How do I start?

0

One way to implement the projected light shader is to extend the sample projected light shader, which assumes the light is sitting somewhere on the z axis and is pointing toward -z. To handle a light at any position and orientation, you might think about how to translate and rotate such a light to place it in the position and orientation required by the sample projected light shader. You will probably find that the translation is the easy part and that the rotation is the hard part. Hint on the rotation: you have light direction, up, and right vectors supplied to you; these vectors are all of unit length and are all at right angles to one another. You can do the rotation simply by forming a 3×3 matrix out of the three direction vectors and doing a matrix multiply. The details are for you to figure out. Be warned that, although you specify the light direction, up, and right vectors as constants in the configuration files, these values will change as you move the light with the “Move Lig

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123