Back to Help


Lights

The lights in ShaderScope are meant to be an easy way to experiment with lighting values in your shaders while taking advantage of user interface convensions that allow you to move them around in real time, change their color, etc. without having to edit any code.

To add a light to your scene, click Lights->Add Light to Scene using the Shader Path's toolbar menu.


Light Properties

Lights in ShaderScope have a position, intensity, and color. To move a light you can click it in any view with a camera (Render Pipeline State and Render Pass) or the Scene Layout window and use the 3D manipulator to move it around.

To edit its intensity and color, select the light in the scene and then click Lights->Properties... on the Shader Path toolbar menu. You can then use the color selector and intensity slider to change how your light interacts with the scene..


Do I Have To Use ShaderScope Lights?

ShaderScope's lights are only here as a UI convenience for easy movement and simple property editing, and you don't have to limit yourself to them. Any Metal Shader Language code will work, which means you can add code to your shaders to implement lights that have behaviors outside of what ShaderScope's lights can do.

You could even write your own light and tie some of its properties to one of ShaderScope's lights so you can take advantage of the UI elements that make moving and editing lights in real time easier. The properties of ShaderScope lights that are passed to your shaders (position, color, intensity) and their variable names are visible in the bridging header code, which you can see in the top section of the Code Edit window.



See also:

Shadow Maps


Back to Help