Mapdev:normal: Difference between revisions
From Spring
Jump to navigationJump to search
| Line 46: | Line 46: | ||
Modifies the shading normal as follows | Modifies the shading normal as follows | ||
shadingNormal.xyz = NORMALIZE(terrainNormal.xyz * (1 - detailNormalTex.a) + detailNormalTex.rgb) | shadingNormal.xyz = NORMALIZE(terrainNormal.xyz * (1 - detailNormalTex.a) | ||
+ detailNormalTex.rgb) | |||
</pre> | </pre> | ||
Revision as of 00:47, 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 | RGBA |
| 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)