Mapdev:specular: Difference between revisions
From Spring
Jump to navigationJump to search
m migrated information from my old spec page. |
m →Image File: added image location |
||
| Line 38: | Line 38: | ||
== Image File == | == Image File == | ||
* Image Location: ./maps/ | |||
* 8 bpp RGBA, any resolution (it will be stretched over the whole terrain). | * 8 bpp RGBA, any resolution (it will be stretched over the whole terrain). | ||
Revision as of 02:06, 21 December 2012
Specular
Gives you per-pixel control over the color and intensity of specular highlights anywhere on the map. You could eg. make all highlights red, or have them depend on the type of material that a pixel represents, or something more exotic Alpha defines how "polished" the surface looks, and and the RGB color is the amount of light that gets reflected for each color channel
| Caution | |
|---|---|
| requires clients to have GLSL-spec hardware |
| (example specular image) | (gif animation) |
| Example Specular Texture | Ingame Result |
|---|
Specification
- If specularTex points to a file that does not exist, you will get full unmoderated specularity based on whatever your map's lighting settings are
- The RGB channels will control the red, green, and blue contribution per highlight
- The alpha channel (multiplied by 16) becomes the specular exponent.
- There is no size requirement on the specular texture, it will be stretched/shrunk to fit the map.
- You have to set the RGB values to zero if you want no specular contribution
mapinfo.lua
The relevant sections of the mapinfo.lua
local mapinfo = {
resources = {
...
specularTex = "",
...
},
...
lighting = {
...
groundSpecularColor = {0.1, 0.1, 0.1},
...
},
...
}
Image File
- Image Location: ./maps/
- 8 bpp RGBA, any resolution (it will be stretched over the whole terrain).