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-09-26 11:07]
Carsten Rewrote the entire Shader Specifications section
matsys:cmat_manual [2005-09-27 09:33]
Carsten Clarified the texture options, added references to the OpenGL Red Book
Line 74: Line 74:
 You can specify arbitrary combinations of these keywords in one material, as only the ''​diffusemap''​ keyword is mandatory. You can specify arbitrary combinations of these keywords in one material, as only the ''​diffusemap''​ keyword is mandatory.
 However, if you use the same keyword more than once, only the last occurrence is considered. The order of the keywords occurrences is not relevant. However, if you use the same keyword more than once, only the last occurrence is considered. The order of the keywords occurrences is not relevant.
- 
  
 ===== Map Compositions ===== ===== Map Compositions =====
Line 133: Line 132:
     * **''​linear''​** or **''​bilinear''​** (This is the default and gives best results.)     * **''​linear''​** or **''​bilinear''​** (This is the default and gives best results.)
  
-  * **''​wrapS''​** This controls horizontal texture wrapping and must be followed by one of+  * **''​wrapS''​** This controls horizontal texture ​coordinate ​wrapping and must be followed by one of
     * **''​repeat''​** for repeating the texture in horizontal direction. This is the default.     * **''​repeat''​** for repeating the texture in horizontal direction. This is the default.
-    * **''​clamp''​** for clamping the texture in horizontal direction.+    * **''​clamp''​** for clamping the texture in horizontal direction, taking the border color into account. As the Ca3DE MatSys never uses or sets the border color, using ''​clamp''​ is rarely ever useful.
     * **''​clampToEdge''​** for clamping the texture in horizontal direction to its edge color. Often useful with cube-map images.     * **''​clampToEdge''​** for clamping the texture in horizontal direction to its edge color. Often useful with cube-map images.
  
-  * **''​wrapT''​** This controls vertical texture wrapping and must be followed by one of+  * **''​wrapT''​** This controls vertical texture ​coordinate ​wrapping and must be followed by one of
     * **''​repeat''​** for repeating the texture in vertical direction. This is the default.     * **''​repeat''​** for repeating the texture in vertical direction. This is the default.
-    * **''​clamp''​** for clamping the texture in vertical direction.+    * **''​clamp''​** for clamping the texture in vertical direction, taking the border color into account. As the Ca3DE MatSys never uses or sets the border color, using ''​clamp''​ is rarely ever useful.
     * **''​clampToEdge''​** for clamping the texture in vertical direction to its edge color. Often useful with cube-map images.     * **''​clampToEdge''​** for clamping the texture in vertical direction to its edge color. Often useful with cube-map images.
  
-  * **''​noScaleDown''​** specifies that the texture image is never scaled down, not even if the user selects a medium or low texture detail setting for tuning the graphics performance. Used e.g. for the Ca3DE splash screen logo, which would get blurred otherwise. (Look into ''​Games/​DeathMatch/​Materials/​Splash.cmat''​ if you want to toy around with it  a little :) ).+  * **''​noScaleDown''​** specifies that the texture image is never scaled down, not even if the user selects a medium or low texture detail setting for tuning the graphics performance. Used e.g. for the Ca3DE splash screen logo, which would get blurred otherwise. (Look into ''​Games/​DeathMatch/​Materials/​Splash.cmat''​ if you want to toy around with it  a little :-) )
 + 
 +The meaning of the ''​minFilter'',​ ''​magFilter'',​ ''​wrapS''​ and ''​wrapT''​ options is analogous to their respective meanings in the OpenGL and DirectX APIs. The OpenGL Programming Guide (the "Red Book") about OpenGL version 1.2 and higher has a good explanation about these options. Although the text is specific to OpenGL, the same concepts apply to the above mentioned options. The "Red Book" for version 1.1 does not address the ''​clampToEdge''​ option, but its text is available online at [[http://​www.rush3d.com/​reference/​opengl-redbook-1.1/​chapter09.html]].
  
 Here is an example from ''​Games/​DeathMatch/​Materials/​Fonts.cmat''​ that demonstrates how the options are used: Here is an example from ''​Games/​DeathMatch/​Materials/​Fonts.cmat''​ that demonstrates how the options are used:
matsys/cmat_manual.txt · Last modified: 2013-01-07 12:07 (external edit)