Mapdev:lightemission: Difference between revisions
From Spring
Jump to navigationJump to search
Created page with "= Light Emission Texture = Adds colour to a fragment (pixel). The colour added is the RGB colour of the emission texture, while the alpha of the emission texture determines th..." |
|||
| Line 40: | Line 40: | ||
| Any, recommended powers of two, will be stretched over the terrain. Should be the same size as the [[Mapdev:specular]] image | | Any, recommended powers of two, will be stretched over the terrain. Should be the same size as the [[Mapdev:specular]] image | ||
|} | |} | ||
<pre> | <pre> | ||
Modifies the fragment color as follows | Modifies the fragment color as follows | ||
Revision as of 00:45, 25 February 2013
Light Emission Texture
Adds colour to a fragment (pixel). The colour added is the RGB colour of the emission texture, while the alpha of the emission texture determines the amount of the original colour that remains.
Can be used for accentuation. For example, metal spots in shadowed regions
| FIXME: needs image file | FIXME: needs image file |
| Without Light Emission Texture | With Light Emission Texture |
|---|
Specification
mapinfo.lua
The relevant sections of the mapinfo.lua
local mapinfo = {
...
resources = {
...
lightEmissionTex = "light_emission.png",
...
},
...
}
Image File
| File Location | ./maps/ |
|---|---|
| File Format | PNG, TGA |
| Colour Depth | 8bpp |
| Channels | RGBA |
| Resolution | Any, recommended powers of two, will be stretched over the terrain. Should be the same size as the Mapdev:specular image |
Modifies the fragment color as follows fragmentColor.rgb = fragmentColor.rgb * (1 - lightEmissionTex.a) + lightEmissionTex.rgb