Difference between revisions of "ShaderLamp (CMS)"
From The Official Visionaire Studio: Adventure Game Engine Wiki
m |
m |
||
Line 42: | Line 42: | ||
| dc || point (r,g,b) ''or'' function (h,s,v) || Diffuse color is similar to ambient color, but it is used to tint the screen itself, as opposed to just the light source. | | dc || point (r,g,b) ''or'' function (h,s,v) || Diffuse color is similar to ambient color, but it is used to tint the screen itself, as opposed to just the light source. | ||
|- | |- | ||
− | | df | float (decimal) || The diffuse factor controls the strength of the diffuse color. 1 = default. Higher than 1 = brighter. Lower than 1 = darker. | + | | df || float (decimal) || The diffuse factor controls the strength of the diffuse color. 1 = default. Higher than 1 = brighter. Lower than 1 = darker. |
|- | |- | ||
− | | exp | integer (number) || The exponent controls the spread of light from the source. 0 = 180º whereas an higher value will have a smaller spread. ''This value is only required for spotlights.'' | + | | exp || integer (number) || The exponent controls the spread of light from the source. 0 = 180º whereas an higher value will have a smaller spread. ''This value is only required for spotlights.'' |
|- | |- | ||
− | | cutoff | float (decimal) || The cutoff is used to define how soft or sharp the edges of the light will be. The value should be something in between 0 & 1. | + | | cutoff || float (decimal) || The cutoff is used to define how soft or sharp the edges of the light will be. The value should be something in between 0 & 1. |
|} | |} | ||
Revision as of 15:02, 9 May 2015
Name | Type |
---|---|
shaderLamp(index, type, pos, targ, falloff, ac, dc, df, exp, cutoff) | Execution |
...
Examples
Spotlight
...
...
Point Light
...
...
Syntax Breakdown
Name | Type | Description |
---|---|---|
index | integer (number) | The index number to assign to the light source. Index starts at 0. |
type | integer (number) | The type of light you want to create. 0 = spotlight. 1 = point light. |
pos | point (x, y, z) | The position of the light source. Z controls how close the light source is to the screen. Lower value = closer. |
targ | point (x, y, z) | The target position of the light source. The light travels from pos to targ. Only for point lighting; set {0,0,0} for spotlight. |
falloff | point (cnst, lnr, quad) | The falloff controls the amount of light decay over distance. Please see here for more details on light attenuation. |
ac | point (r,g,b) or function (h,s,v) | This allows you to apply an ambient color to the light source. It uses RGB by default but you can use HSV instead if you prefer by using the hsv() function. |
dc | point (r,g,b) or function (h,s,v) | Diffuse color is similar to ambient color, but it is used to tint the screen itself, as opposed to just the light source. |
df | float (decimal) | The diffuse factor controls the strength of the diffuse color. 1 = default. Higher than 1 = brighter. Lower than 1 = darker. |
exp | integer (number) | The exponent controls the spread of light from the source. 0 = 180º whereas an higher value will have a smaller spread. This value is only required for spotlights. |
cutoff | float (decimal) | The cutoff is used to define how soft or sharp the edges of the light will be. The value should be something in between 0 & 1. |
Resources
Name | Description |
---|---|
n/a | A working .ved file, complete with resources. Check out the readme.txt file for instructions. |