![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
PARAMETERS |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : -10 to 10 The areas facing away from the virtual light are classed as being in shadow. You can set the intensity of the lighting in the shadow area using this parameter. |
|
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : -10 to 10 The areas facing toward the virtual light are classed as being lit. You can set the intensity of the lighting in the lit areas using this parameter. This is the same as increasing the intensity on a conventional light. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
A Note About Negative Brightness You can set both Shadow and Lit Area Brightness to negative values. These will have no visible effect when the shader is used on its own, but when used as a layered shader, it allows similar effects to setting a negative light intensity with trueSpace lights - that is, the light then removes illumination rather than adds it. This means that a shadow colour of red with a negative Shadow Area Brightness will remove the colour red from the trueSpace illumination in the shadowed area of the virtual light. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : -10 to 10 These parameters define the angles (actually, the cosine of the angle between the surface normal and the light source) at which the illumination reaches the Shadow Area Brightness and the Lit Area Brightness. 1 represents directly facing the light source, 0 represents right angles to the light source, and -1 is facing directly away from the light source. Note that values above 1 and less than -1 are allowed, so that you can control the blending of the illumination. |
|
|
![]() |
![]() |
![]() |
The right sphere has a Shadow Angle of 0, resulting in the Shadow Intensity being reached when the surface is at right angles to the light source. |
|
|
![]() |
![]() |
![]() |
The right sphere has a Lit Angle of 1.5, so that the maximum intensity (set by Lit Area Brightness) is never actually reached. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : 0 to 100 This controls the overall intensity of the illumination calculated by the shader. It acts as a multiplier for both Shadow Area Brightness and Lit Area Brightness. This allows you to control the strength of the effect when the shader is layered, without having to continually adjust both Brightness settings. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : 0 to 100 The position of the light in the 3D world is set using Light Position. However, the ShaderLab colour parameters only allow for values up to (10,10,10). Using the Light Distance parameter, you can multiply the values set in Light Position, to move your light source further away. It’s also a handy way of shifting the light source once you have the angle set using Light Position, without having to recalculate the individual x, y and z values to get the new position! Values greater than 1 will scale the light further away, and values of less than 1 will scale the light closer. |
![]() |
![]() |
![]() |
![]() |
|
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : Off or On When unchecked, the shader uses the light position as defined in the Light Position parameter. When checked, the shader takes the light’s position from the camera position (for a Point Light, this results in a point light which follows the camera’s position; for an Infinite Light, the light is taken as pointing from the camera’s location to the origin). |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Linear Fall Off Examples : |
![]() |
![]() |
![]() |
The following 2 images use a Fall Off Intensity of 0 |
|
|
![]() |
![]() |
![]() |
The following 3 images use a Fall Off Distance of 8.5 |
|
|
![]() |
![]() |
![]() |
The following 2 images use a Light Position of (0,0,2), and a Fall Off Intensity of 0 |
|
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Range : -10 to 10 (for each of the x, y and z parameters) For a Point Light, this parameter determines the co-ordinates of the light’s position in space. Note that if you set the position to be inside the object, this will affect the lighting (the points on the object’s surface will be facing away from the light source, so all of the angles will be negative). Remember that you can alter the Light Position for Point Lights by using the Light Distance parameter to move the light nearer or further away, but retaining the same relative angle between the object and the virtual light. Some examples of varying the Light Position for a Point Light are shown below : |
|
|
|
![]() |
![]() |
![]() |
For an Infinite Light, this parameter sets the vector of the light (the direction the light is coming from). Note that since this represents a vector (direction) rather than a position in space, the light cannot be classed as “inside” the object (unlike the Point Light). Also, the Light Distance will have no effect (it simply makes the vector longer, but it still represents light coming in from the same angle). Some examples of Light Position with an Infinite Light follow : |