User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
matsys:cmat_manual [2005-10-09 12:17]
Carsten Wrote contents for the special-purpose shaders sections
matsys:cmat_manual [2005-10-22 13:50]
Carsten Fixed a typo and clarified "1" vs "l".
Line 238: Line 238:
  
 The remaining keywords further specify important properties of this material. Please refer to section [[#​Keyword_Reference|Keyword Reference]] for a detailed description. Short explanations of their meanings are given in the comments in the above example. The remaining keywords further specify important properties of this material. Please refer to section [[#​Keyword_Reference|Keyword Reference]] for a detailed description. Short explanations of their meanings are given in the comments in the above example.
- 
  
 ==== The Terrain Shader ==== ==== The Terrain Shader ====
Line 261: Line 260:
 :!: But if for example somebody wanted to model an indoor cave with the Ca3DE terrain technique, having a shader that accounts for the light of dynamic light sources even on terrains would make a lot of sense. Good news is that, as indicated above, it is //easy// to write such a shader -- I'll probably do so as soon as I need one. :!: But if for example somebody wanted to model an indoor cave with the Ca3DE terrain technique, having a shader that accounts for the light of dynamic light sources even on terrains would make a lot of sense. Good news is that, as indicated above, it is //easy// to write such a shader -- I'll probably do so as soon as I need one.
  
-Next, the **''​A_Terrain''​** (and the future **''​L_Terrain''​**) shader requires a diffuse-map to be specified. This diffuse-map will be scaled to match the physical size of the terrain, that is, it will cover the terrain completely. In order to get the edges of the terrain properly ​textures, it makes sense to also specify **''​clampToEdge''​** border wrapping for the diffuse texture:+Next, the **''​A_Terrain''​** (and the future **''​L_Terrain''​**) shader requires a diffuse-map to be specified. This diffuse-map will be scaled to match the physical size of the terrain, that is, it will cover the terrain completely. In order to get the edges of the terrain properly ​textured, it makes sense to also specify **''​clampToEdge''​** border wrapping for the diffuse texture:
 <​code>​ <​code>​
     diffusemap Textures/​Terrains/​BPRockB_tx1.png,​ wrapS clampToEdge,​ wrapT clampToEdge     diffusemap Textures/​Terrains/​BPRockB_tx1.png,​ wrapS clampToEdge,​ wrapT clampToEdge
Line 270: Line 269:
 Next, the **''​A_Terrain''​** shader employs the texture-map that is specified with the **''​lumamap''​** keyword as a //​detail-map//​ for the terrain. This is a good example for how the specification of a custom shader (here **''​A_Terrain''​**) can entirely alter the meaning of a material keyword. We will see below how the coarseness (the repetition-count) of the detail-map is set. Next, the **''​A_Terrain''​** shader employs the texture-map that is specified with the **''​lumamap''​** keyword as a //​detail-map//​ for the terrain. This is a good example for how the specification of a custom shader (here **''​A_Terrain''​**) can entirely alter the meaning of a material keyword. We will see below how the coarseness (the repetition-count) of the detail-map is set.
 <​code>​ <​code>​
-    lumamap ​   Textures/​Terrains/​CommonDetail1.png      // "​A_Terrain"​ takes the Luma-map as Detail-map (optional).+    lumamap ​   Textures/​Terrains/​CommonDetail2.png      // "​A_Terrain"​ takes the Luma-map as Detail-map (optional).
 </​code>​ </​code>​
 The detail-map is optional, and may be omitted. However, terrains look a lot better with them, and so their use is recommended. The detail-map is optional, and may be omitted. However, terrains look a lot better with them, and so their use is recommended.
Line 303: Line 302:
         diffusemap Textures/​Terrains/​BPRockB_tx1.png,​ wrapS clampToEdge,​ wrapT clampToEdge         diffusemap Textures/​Terrains/​BPRockB_tx1.png,​ wrapS clampToEdge,​ wrapT clampToEdge
         lightmap ​  ​$lightmap         lightmap ​  ​$lightmap
-        lumamap ​   Textures/​Terrains/​CommonDetail1.png+        lumamap ​   Textures/​Terrains/​CommonDetail2.png
  
         shaderParamExpr fParam4 ​    // The first eight shader parameters are taken from fParam4 to fParam11         shaderParamExpr fParam4 ​    // The first eight shader parameters are taken from fParam4 to fParam11
matsys/cmat_manual.txt ยท Last modified: 2013-01-07 12:07 (external edit)