Mapdev:normal: Difference between revisions
From Spring
Jump to navigationJump to search
m →Image File: used image template styling |
|||
| Line 43: | Line 43: | ||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:Mapdev]] | [[Category:Mapdev]] | ||
<pre> | |||
Modifies the shading normal as follows | |||
shadingNormal.xyz = NORMALIZE(terrainNormal.xyz * (1 - detailNormalTex.a) + detailNormalTex.rgb) | |||
</pre> | |||
Revision as of 00:46, 25 February 2013
Normal Texture
FIXME: description as to why you want to use normal textures.
| Caution | |
|---|---|
| Requires clients to have GLSL-spec hardware |
| FIXME: needs image file | FIXME: needs image file |
| Without Normal Map | With Normal Map |
|---|
Specification
mapinfo.lua
The relevant sections of the mapinfo.lua
local mapinfo = {
...
resources = {
...
detailNormalTex = "normal.png",
...
},
...
}
Image File
| File Location | ./maps/ |
|---|---|
| File Format | PNG, TGA |
| Colour Depth | 8bpp |
| Channels | RGB |
| Resolution | Any, recommended powers of two, will be stretched over the terrain. |
Modifies the shading normal as follows shadingNormal.xyz = NORMALIZE(terrainNormal.xyz * (1 - detailNormalTex.a) + detailNormalTex.rgb)