Changes between Initial Version and Version 1 of MaterialFormat


Ignore:
Timestamp:
Aug 14, 2012, 3:53:11 AM (12 years ago)
Author:
Kieran P
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MaterialFormat

    v1 v1  
     1TODO: Describe the config options better
     2
     3{{{
     4<?xml version="1.0" encoding="utf-8"?>
     5<material>
     6    <shader effect="model_transparent"/>
     7    <alpha_blending/>
     8    <define name="USE_TRANSPARENT" value="1"/>
     9
     10    <alternative material="basic_trans_ao_spec.xml" quality="8"/>
     11    <alternative material="alphatest_ao_parallax_spec.xml" if="CFG_FORCE_ALPHATEST"/>
     12   
     13    <!-- REQUIRES: Actor must provide a texture named "normTex", where the Alpha channel
     14                   is the heightmap (white = high).
     15         COMMENT: Pixels that are exactly white are calculated more efficiently (on average)
     16                  if dynamic branching is supported by the player's GPU.
     17         EFFICIENCY: This is a moderately expensive effect, so use with care. -->
     18    <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/>
     19    <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/>
     20   
     21    <!-- REQUIRES: Actor must provide a texture named "normTex", where the RGB channels
     22                   are a normal map corresponding to XYZ normals.
     23         EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. -->
     24    <define name="USE_NORMAL_MAP" value="1"/>
     25   
     26    <!-- REQUIRES: Actor must provide a texture named "specTex", where the RGB channels
     27                   provide a specular colour multiplier.
     28                   Material must provide a uniform definition for "specularPower" that controls
     29                   the glossiness of the effect.
     30         COMMENT: The intensity of the colour controls the specular amount, so black pixels have
     31                  no specularity.
     32         COMPATIBILITY: This effect is incompatible with the old "USE_SPECULAR" effect.
     33         EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. -->
     34    <define name="USE_SPECULAR_MAP" value="1"/>
     35   
     36    <!-- REQUIRES: That "USE_SPECULAR_MAP" is enabled and a texture named "specTex" is provided by the Actor.
     37                   The Alpha channel of the texture defines the amount of self-illumination, with
     38                   transparency being no self-illumination.
     39         COMMENT: Full self-illumination means the screen colour of a pixel is equal to its baseTex value.
     40         EFFICIENCY: This is a very cheap effect, however it also requires the calculation of specular. -->
     41    <define name="USE_SELF_LIGHT" value="1"/>
     42   
     43    <!-- REQUIRES: Actor must provide a texture named "aoTex", where the R channel is the Ambient Occlusion.
     44                   The model must provide a second, non-overlapping set of UV coordinates.
     45         COMMENT: The texture is combined using a multiply blend of (2 * ao * baseTex). -->
     46    <define name="USE_AO" value="1"/>
     47   
     48    <!-- Settings for effects above:
     49         First value: Normal mapping intensity.
     50         Second value: Specular power.
     51         Third value: Parallax scale.
     52         Fourth value: AO amount. -->
     53    <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/>
     54</material>
     55}}}