OpenGL2: Add normalScale and parallaxDepth stage keywords and helper cvars.

This commit is contained in:
SmileTheory 2014-03-03 21:02:39 -08:00
parent ea2810c085
commit ee67d0a981
7 changed files with 224 additions and 45 deletions

View file

@ -203,6 +203,44 @@ Cvars for advanced material usage:
0 - No. (default)
1 - Yes.
r_baseSpecular - Set the specular reflectance of materials
which don't include a specular map or
use the specularReflectance keyword.
0 - No.
0.04 - Realistic. (default)
1.0 - Ack.
r_baseGloss - Set the glossiness of materials which don't
include a specular map or use the
specularExponent keyword.
0 - Rough.
0.3 - Default.
1.0 - Shiny.
r_baseNormalX - Set the scale of the X values from normal
maps when the normalScale keyword is not
used.
-1 - Flip X.
0 - Ignore X.
1 - Normal X. (default)
2 - Double X.
r_baseNormalY - Set the scale of the Y values from normal
maps when the normalScale keyword is not
used.
-1 - Flip Y.
0 - Ignore Y.
1 - Normal Y. (default)
2 - Double Y.
r_baseParallax - Sets the scale of the parallax effect for
materials when the parallaxDepth keyword
is not used.
0 - No depth.
0.01 - Pretty smooth.
0.05 - Standard depth. (default)
0.1 - Looks broken.
Cvars for image interpolation and generation:
r_imageUpsample - Use interpolation to artifically increase
the resolution of all textures. Looks good
@ -362,6 +400,8 @@ Here's an example of a material stored in one, showing off some new features:
{
stage normalparallaxmap
map textures/abandon/grass3_1024_n.png
normalScale 1 1
parallaxDepth 0.05
}
{
stage specularmap
@ -401,7 +441,16 @@ they mean:
alpha channel of the specular map, so if it were set to 16, and the alpha
channel of the specular map was set to 0.5, then the shininess would be
set to 8. Default 256.
normalScale <x> <y>
- State the X and Y scales of the normal map. This is useful for increasing
or decreasing the "strength" of the normal map, or entering negative values
to flip the X and/or Y values. Default 1 1.
parallaxDepth <value>
- State the maximum depth of the parallax map. This is a fairly sensitive
value, and I recommend the default or lower. Default 0.05.
An important note is that normal and specular maps influence the diffuse map
declared before them, so materials like this are possible: