Ticket #1613: BetterPatch.patch
File BetterPatch.patch, 38.7 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/art/materials/objectcolor.xml
2 2 <material> 3 3 <shader effect="model"/> 4 4 <define name="USE_OBJECTCOLOR" value="1"/> 5 6 <required_texture name="baseTex"/> 5 7 </material> -
binaries/data/mods/public/art/materials/player_trans_parallax.xml
7 7 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 8 8 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 9 9 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 10 <define name="USE_NORMAL_MAP" value="1"/>11 10 12 11 <!--<define name="USE_SPECULAR_MAP" value="1"/> 13 12 <define name="USE_SELF_LIGHT" value="1"/>--> … … 20 19 Third value: Parallax scale. 21 20 Fourth value: AO amount. --> 22 21 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.75"/> 22 23 <required_texture name="baseTex"/> 24 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 25 23 26 </material> -
binaries/data/mods/public/art/materials/player_trans.xml
2 2 <material> 3 3 <shader effect="model"/> 4 4 <define name="USE_PLAYERCOLOR" value="1"/> 5 <required_texture name="baseTex"/> 5 6 </material> -
binaries/data/mods/public/art/materials/trans_wind_parallax_spec.xml
6 6 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 7 7 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 8 8 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 9 <define name="USE_NORMAL_MAP" value="1"/>10 <define name="USE_SPECULAR_MAP" value="1"/>11 9 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 12 10 13 11 <renderquery name="sim_time"/> 14 12 <define name="USE_WIND" value="1"/> 15 13 <uniform name="windData" value="1.0 1.0"/> 14 15 <required_texture name="baseTex"/> 16 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 17 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 16 18 </material> -
binaries/data/mods/public/art/materials/terrain_norm.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <material> 3 3 <shader effect="terrain_base"/> 4 <define name="USE_NORMAL_MAP" value="1"/>5 4 6 5 <uniform name="effectSettings" value="1.0 15.0 0.0 0.0"/> 6 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 7 7 </material> -
binaries/data/mods/public/art/materials/trans_wind.xml
4 4 <renderquery name="sim_time"/> 5 5 <define name="USE_WIND" value="1"/> 6 6 <uniform name="windData" value="1.0 1.0"/> 7 <required_texture name="baseTex"/> 7 8 </material> -
binaries/data/mods/public/art/materials/player_trans_spec.xml
3 3 <shader effect="model"/> 4 4 <alternative material="player_trans.xml" quality="1"/> 5 5 <define name="USE_PLAYERCOLOR" value="1"/> 6 <define name="USE_SPECULAR_MAP" value="1"/>7 6 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 8 7 9 8 <!-- Settings for effects above: … … 12 11 Third value: Parallax scale. 13 12 Fourth value: AO amount. --> 14 13 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 14 15 <required_texture name="baseTex"/> 16 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 17 15 18 </material> -
binaries/data/mods/public/art/materials/player_water.xml
13 13 <uniform name="murkiness" value="0.6"/> 14 14 <uniform name="reflectionTint" value="0.3 0.4 0.3"/> 15 15 <uniform name="reflectionTintStrength" value="0.1"/> 16 <required_texture name="baseTex"/> 16 17 </material> -
binaries/data/mods/public/art/materials/terrain_base.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <material> 3 3 <shader effect="terrain_base"/> 4 <required_texture name="baseTex"/> 4 5 </material> -
binaries/data/mods/public/art/materials/basic_trans.xml
4 4 <alpha_blending/> 5 5 <define name="USE_TRANSPARENT" value="1"/> 6 6 <alternative material="alphatest.xml" if="CFG_FORCE_ALPHATEST"/> 7 8 <required_texture name="baseTex"/> 7 9 </material> -
binaries/data/mods/public/art/materials/basic_trans_ao_spec.xml
11 11 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 12 12 <define name="USE_NORMAL_MAP" value="1"/>--> 13 13 14 <define name="USE_SPECULAR_MAP" value="1"/>15 14 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 16 15 17 <define name="USE_AO" value="1"/>18 16 19 17 <!-- Settings for effects above: 20 18 First value: Normal mapping intensity. … … 22 20 Third value: Parallax scale. 23 21 Fourth value: AO amount. --> 24 22 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 23 24 <required_texture name="baseTex"/> 25 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 26 <required_texture name="aoTex" define="USE_AO"/> 25 27 </material> -
binaries/data/mods/public/art/materials/basic_trans_spec.xml
11 11 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 12 12 <define name="USE_NORMAL_MAP" value="1"/>--> 13 13 14 <define name="USE_SPECULAR_MAP" value="1"/>15 14 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 16 15 17 16 <!-- Settings for effects above: … … 20 19 Third value: Parallax scale. 21 20 Fourth value: AO amount. --> 22 21 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 22 23 <required_texture name="baseTex"/> 24 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 25 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 26 23 27 </material> -
binaries/data/mods/public/art/materials/objectcolor_specmap.xml
4 4 5 5 <define name="USE_OBJECTCOLOR" value="1"/> 6 6 7 <define name="USE_SPECULAR_MAP" value="1"/>8 7 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 8 9 <required_texture name="baseTex"/> 10 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 9 11 </material> -
binaries/data/mods/public/art/materials/objectcolor_spec.xml
7 7 <define name="USE_SPECULAR" value="1"/> 8 8 <uniform name="specularPower" value="16.0"/> 9 9 <uniform name="specularColor" value="1.0 1.0 1.0"/> 10 11 <required_texture name="baseTex"/> 10 12 </material> -
binaries/data/mods/public/art/materials/basic_glow.xml
5 5 <define name="USE_TRANSPARENT" value="1"/> 6 6 <alternative material="basic_trans.xml" quality="2"/> 7 7 <alternative material="alphatest_ao_parallax_spec.xml" if="CFG_FORCE_ALPHATEST"/> 8 <define name="USE_SPECULAR_MAP" value="1"/>9 8 <define name="USE_SELF_LIGHT" value="1"/> 10 9 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 10 <required_texture name="baseTex"/> 11 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 11 12 </material> -
binaries/data/mods/public/art/materials/terrain_norm_spec.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <material> 3 3 <shader effect="terrain_base"/> 4 <define name="USE_NORMAL_MAP" value="1"/>5 <define name="USE_SPECULAR_MAP" value="1"/>6 4 7 5 <uniform name="effectSettings" value="1.0 15.0 0.0 0.0"/> 6 <required_texture name="baseTex"/> 7 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 8 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 8 9 </material> -
binaries/data/mods/public/art/materials/aura.xml
4 4 <alpha_blending/> 5 5 <renderquery name="sim_time"/> 6 6 <uniform name="translation" value="0.0 -0.1"/> 7 <define name="USE_SPECULAR_MAP" value="1"/>8 7 <define name="USE_SELF_LIGHT" value="1"/> 9 8 <uniform name="specularPower" value="100.0"/> 10 9 <uniform name="specularColor" value="1.0 1.0 1.0"/> 10 <required_texture name="baseTex"/> 11 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 11 12 </material> -
binaries/data/mods/public/art/materials/player_trans_ao.xml
12 12 <!--<define name="USE_SPECULAR_MAP" value="1"/> 13 13 <define name="USE_SELF_LIGHT" value="1"/>--> 14 14 15 <define name="USE_AO" value="1"/>16 15 17 16 <!-- Settings for effects above: 18 17 First value: Normal mapping intensity. … … 20 19 Third value: Parallax scale. 21 20 Fourth value: AO amount. --> 22 21 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.6"/> 22 23 <required_texture name="baseTex"/> 24 <required_texture name="aoTex" define="USE_AO"/> 25 23 26 </material> -
binaries/data/mods/public/art/materials/basic_spec.xml
5 5 <define name="USE_SPECULAR" value="1"/> 6 6 <uniform name="specularPower" value="16.0"/> 7 7 <uniform name="specularColor" value="1.0 1.0 1.0"/> 8 9 <required_texture name="baseTex"/> 8 10 </material> -
binaries/data/mods/public/art/materials/no_trans_parallax_ao.xml
6 6 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 7 7 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 8 8 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 9 <define name="USE_NORMAL_MAP" value="1"/>10 9 11 10 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 12 11 13 <define name="USE_AO" value="1"/>14 12 15 13 <!-- Settings for effects above: 16 14 First value: Normal mapping intensity. … … 18 16 Third value: Parallax scale. 19 17 Fourth value: AO amount. --> 20 18 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 19 <required_texture name="baseTex"/> 20 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 21 <required_texture name="aoTex" define="USE_AO"/> 22 21 23 </material> -
binaries/data/mods/public/art/materials/alphatest_ao_parallax_spec.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <material> 3 <required_texture name="baseTex"/> 4 3 5 <shader effect="model_transparent"/> 4 6 <define name="USE_TRANSPARENT" value="1"/> 5 7 <define name="USE_ALPHATEST" value="1"/> 6 8 9 <required_texture name="baseTex"/> 7 10 <!--define name="USE_PLAYERCOLOR" value="1"/--> 8 11 9 12 <!-- REQUIRES: Actor must provide a texture named "normTex", where the Alpha channel -
binaries/data/mods/public/art/materials/waterfall.xml
7 7 8 8 <uniform name="specularPower" value="16.0"/> 9 9 <uniform name="specularColor" value="1.0 1.0 1.0"/> 10 11 <required_texture name="baseTex"/> 10 12 </material> -
binaries/data/mods/public/art/materials/rock_bump_spec_test.xml
16 16 <!-- REQUIRES: Actor must provide a texture named "normTex", where the RGB channels 17 17 are a normal map corresponding to XYZ normals. 18 18 EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. --> 19 <define name="USE_NORMAL_MAP" value="1"/>20 19 21 20 <!-- REQUIRES: Actor must provide a texture named "specTex", where the RGB channels 22 21 provide a specular colour multiplier. … … 26 25 no specularity. 27 26 COMPATIBILITY: This effect is incompatible with the old "USE_SPECULAR" effect. 28 27 EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. --> 29 <define name="USE_SPECULAR_MAP" value="1"/>30 28 31 29 <!-- REQUIRES: That "USE_SPECULAR_MAP" is enabled and a texture named "specTex" is provided by the Actor. 32 30 The Alpha channel of the texture defines the amount of self-illumination, with … … 46 44 Third value: Parallax scale. 47 45 Fourth value: AO amount. --> 48 46 <uniform name="effectSettings" value="5.0 50.0 0.0075 0.85"/> 47 48 <required_texture name="baseTex"/> 49 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 50 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 49 51 </material> -
binaries/data/mods/public/art/materials/playercolor_spec.xml
7 7 <define name="USE_SPECULAR" value="1"/> 8 8 <uniform name="specularPower" value="16.0"/> 9 9 <uniform name="specularColor" value="1.0 1.0 1.0"/> 10 <required_texture name="baseTex"/> 10 11 </material> -
binaries/data/mods/public/art/materials/blend_spec.xml
9 9 <define name="USE_SPECULAR" value="1"/> 10 10 <uniform name="specularPower" value="16.0"/> 11 11 <uniform name="specularColor" value="1.0 1.0 1.0"/> 12 <required_texture name="baseTex"/> 12 13 </material> -
binaries/data/mods/public/art/materials/basic_trans_parallax_spec.xml
9 9 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 10 10 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 11 11 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 12 <define name="USE_NORMAL_MAP" value="1"/>13 12 14 <define name="USE_SPECULAR_MAP" value="1"/>15 13 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 16 14 17 15 <!--<define name="USE_AO" value="1"/>--> … … 22 20 Third value: Parallax scale. 23 21 Fourth value: AO amount. --> 24 22 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 23 <required_texture name="baseTex"/> 24 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 25 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 25 26 </material> -
binaries/data/mods/public/art/materials/alphatest_spec.xml
7 7 <define name="USE_SPECULAR" value="1"/> 8 8 <uniform name="specularPower" value="16.0"/> 9 9 <uniform name="specularColor" value="1.0 1.0 1.0"/> 10 <required_texture name="baseTex"/> 10 11 </material> -
binaries/data/mods/public/art/materials/material.rnc
39 39 element renderquery { 40 40 attribute name { text } 41 41 }* 42 element required_texture { 43 attribute name { text } 44 }* 42 45 } -
binaries/data/mods/public/art/materials/basic_trans_ao_parallax_spec.xml
9 9 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 10 10 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 11 11 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 12 <define name="USE_NORMAL_MAP" value="1"/>13 12 14 <define name="USE_SPECULAR_MAP" value="1"/>15 13 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 16 14 17 <define name="USE_AO" value="1"/>18 15 19 16 <!-- Settings for effects above: 20 17 First value: Normal mapping intensity. … … 22 19 Third value: Parallax scale. 23 20 Fourth value: AO amount. --> 24 21 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 22 23 <required_texture name="baseTex"/> 24 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 25 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 26 <required_texture name="aoTex" define="USE_AO"/> 25 27 </material> -
binaries/data/mods/public/art/materials/terrain_grass.xml
5 5 <!--define name="USE_SPECULAR_MAP" value="1"/--> 6 6 7 7 <!--uniform name="specularPower" value="15.0"/--> 8 <required_texture name="baseTex"/> 8 9 </material> -
binaries/data/mods/public/art/materials/material.rng
86 86 <attribute name="name"/> 87 87 </element> 88 88 </zeroOrMore> 89 <zeroOrMore> 90 <element name="required_texture"> 91 <attribute name="name"/> 92 </element> 93 </zeroOrMore> 89 94 </interleave> 90 95 </element> -
binaries/data/mods/public/art/materials/basic_trans_ao.xml
14 14 <!--<define name="USE_SPECULAR_MAP" value="1"/> 15 15 <define name="USE_SELF_LIGHT" value="1"/>--> 16 16 17 <define name="USE_AO" value="1"/>18 17 19 18 <!-- Settings for effects above: 20 19 First value: Normal mapping intensity. … … 22 21 Third value: Parallax scale. 23 22 Fourth value: AO amount. --> 24 23 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 24 25 <required_texture name="baseTex"/> 26 <required_texture name="aoTex" define="USE_AO"/> 25 27 </material> -
binaries/data/mods/public/art/materials/terrain_triplanar_norm_spec.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <material> 3 3 <shader effect="terrain_base"/> 4 <define name="USE_NORMAL_MAP" value="1"/>5 <define name="USE_SPECULAR_MAP" value="1"/>6 4 <define name="USE_TRIPLANAR" value="1"/> 7 5 8 6 <uniform name="effectSettings" value="1.0 15.0 0.0 0.0"/> 7 <required_texture name="baseTex"/> 8 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 9 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 9 10 </material> -
binaries/data/mods/public/art/materials/basic_trans_wind.xml
6 6 <renderquery name="sim_time"/> 7 7 <define name="USE_WIND" value="1"/> 8 8 <uniform name="windData" value="1.0 1.0"/> 9 <required_texture name="baseTex"/> 9 10 </material> -
binaries/data/mods/public/art/materials/no_trans_ao.xml
11 11 <!--<define name="USE_SPECULAR_MAP" value="1"/> 12 12 <define name="USE_SELF_LIGHT" value="1"/>--> 13 13 14 <define name="USE_AO" value="1"/>15 14 16 15 <!-- Settings for effects above: 17 16 First value: Normal mapping intensity. … … 19 18 Third value: Parallax scale. 20 19 Fourth value: AO amount. --> 21 20 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 21 22 <required_texture name="baseTex"/> 23 <required_texture name="aoTex" define="USE_AO"/> 22 24 </material> -
binaries/data/mods/public/art/materials/alphatest.xml
3 3 <shader effect="model_transparent"/> 4 4 <define name="USE_TRANSPARENT" value="1"/> 5 5 <define name="USE_ALPHATEST" value="1"/> 6 <required_texture name="baseTex"/> 7 6 8 </material> -
binaries/data/mods/public/art/materials/basic_specmap.xml
10 10 no specularity. 11 11 COMPATIBILITY: This effect is incompatible with the old "USE_SPECULAR" effect. 12 12 EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. --> 13 <define name="USE_SPECULAR_MAP" value="1"/>14 13 15 14 <!-- Settings for effects above: 16 15 First value: Normal mapping intensity. … … 18 17 Third value: Parallax scale. 19 18 Fourth value: AO amount. --> 20 19 <uniform name="effectSettings" value="1.0 25.0 0.0075 0.85"/> 20 21 <required_texture name="baseTex"/> 22 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 21 23 </material> -
binaries/data/mods/public/art/materials/terrain_triplanar.xml
4 4 <define name="USE_TRIPLANAR" value="1"/> 5 5 6 6 <uniform name="effectSettings" value="1.0 15.0 0.0 0.0"/> 7 <required_texture name="baseTex"/> 7 8 </material> -
binaries/data/mods/public/art/materials/player_trans_parallax_spec.xml
7 7 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 8 8 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 9 9 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 10 <define name="USE_NORMAL_MAP" value="1"/>11 10 12 <define name="USE_SPECULAR_MAP" value="1"/>13 11 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 14 12 15 13 <!--<define name="USE_AO" value="1"/>--> … … 20 18 Third value: Parallax scale. 21 19 Fourth value: AO amount. --> 22 20 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 21 22 <required_texture name="baseTex"/> 23 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 24 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 25 23 26 </material> -
binaries/data/mods/public/art/materials/rock_bump_spec_ao_test.xml
17 17 <!-- REQUIRES: Actor must provide a texture named "normTex", where the RGB channels 18 18 are a normal map corresponding to XYZ normals. 19 19 EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. --> 20 <define name="USE_NORMAL_MAP" value="1"/>21 20 22 21 <!-- REQUIRES: Actor must provide a texture named "specTex", where the RGB channels 23 22 provide a specular colour multiplier. … … 27 26 no specularity. 28 27 COMPATIBILITY: This effect is incompatible with the old "USE_SPECULAR" effect. 29 28 EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. --> 30 <define name="USE_SPECULAR_MAP" value="1"/>31 29 32 30 <!-- REQUIRES: That "USE_SPECULAR_MAP" is enabled and a texture named "specTex" is provided by the Actor. 33 31 The Alpha channel of the texture defines the amount of self-illumination, with … … 39 37 <!-- REQUIRES: Actor must provide a texture named "aoTex", where the R channel is the Ambient Occlusion. 40 38 The model must provide a second, non-overlapping set of UV coordinates. 41 39 COMMENT: The texture is combined using a multiply blend of (2 * ao * baseTex). --> 42 <define name="USE_AO" value="1"/>43 40 44 41 <!-- Settings for effects above: 45 42 First value: Normal mapping intensity. … … 47 44 Third value: Parallax scale. 48 45 Fourth value: AO amount. --> 49 46 <uniform name="effectSettings" value="1.0 10.0 0.0075 0.85"/> 47 48 <required_texture name="baseTex"/> 49 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 50 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 51 <required_texture name="aoTex" define="USE_AO"/> 52 50 53 </material> -
binaries/data/mods/public/art/materials/player_trans_ao_parallax_spec.xml
7 7 <conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 8 8 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 9 9 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/> 10 <define name="USE_NORMAL_MAP" value="1"/>11 10 12 <define name="USE_SPECULAR_MAP" value="1"/>13 11 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 14 12 15 <define name="USE_AO" value="1"/>16 13 17 14 <!-- Settings for effects above: 18 15 First value: Normal mapping intensity. … … 20 17 Third value: Parallax scale. 21 18 Fourth value: AO amount. --> 22 19 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.6"/> 20 21 <required_texture name="baseTex"/> 22 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 23 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 24 <required_texture name="aoTex" define="USE_AO"/> 23 25 </material> -
binaries/data/mods/public/art/materials/player_trans_ao_spec.xml
7 7 <!--<conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/> 8 8 <conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/> 9 9 <conditional_define name="USE_VHQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_VHQ_DIST"/>--> 10 <define name="USE_NORMAL_MAP" value="1"/>11 10 12 <define name="USE_SPECULAR_MAP" value="1"/>13 11 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 14 12 15 <define name="USE_AO" value="1"/>16 13 17 14 <!-- Settings for effects above: 18 15 First value: Normal mapping intensity. … … 20 17 Third value: Parallax scale. 21 18 Fourth value: AO amount. --> 22 19 <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/> 20 21 <required_texture name="baseTex"/> 22 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 23 <required_texture name="normTex" define="USE_NORMAL_MAP"/> 24 <required_texture name="aoTex" define="USE_AO"/> 25 23 26 </material> -
binaries/data/mods/public/art/materials/player_trans_spec_helmet.xml
3 3 <shader effect="model"/> 4 4 <alternative material="player_trans.xml" quality="1"/> 5 5 <define name="USE_PLAYERCOLOR" value="1"/> 6 <define name="USE_SPECULAR_MAP" value="1"/>7 6 <!-- <define name="USE_SELF_LIGHT" value="1"/> --> 8 7 9 8 <!-- Settings for effects above: … … 12 11 Third value: Parallax scale. 13 12 Fourth value: AO amount. --> 14 13 <uniform name="effectSettings" value="1.0 20.0 0.0075 0.85"/> 14 15 <required_texture name="baseTex"/> 16 <required_texture name="specTex" define="USE_SPECULAR_MAP"/> 17 15 18 </material> -
binaries/data/mods/public/art/materials/default.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <material> 3 3 <shader effect="model"/> 4 <required_texture name="baseTex"/> 4 5 </material> -
source/graphics/ObjectBase.h
28 28 #include <boost/unordered_set.hpp> 29 29 #include "lib/file/vfs/vfs_path.h" 30 30 #include "ps/CStr.h" 31 #include "ps/CStrIntern.h" 31 32 32 33 #include <boost/random/mersenne_twister.hpp> 33 34 … … 70 71 struct Samp 71 72 { 72 73 // identifier name of sampler in GLSL shaders 73 CStr m_SamplerName;74 CStrIntern m_SamplerName; 74 75 // path to load from 75 76 VfsPath m_SamplerFile; 76 77 }; -
source/graphics/Material.h
31 31 32 32 struct TextureSampler 33 33 { 34 TextureSampler(CStr &n, CTexturePtr t) : Name(n), Sampler(t) {} 34 TextureSampler(const CStr &n, CTexturePtr t) : Name(n), Sampler(t) {} 35 TextureSampler(const CStrIntern &n, CTexturePtr t) : Name(n), Sampler(t) {} 35 36 36 37 CStrIntern Name; 37 38 CTexturePtr Sampler; … … 74 75 void AddRenderQuery(const char* key); 75 76 const CShaderRenderQueries& GetRenderQueries() const { return m_RenderQueries; } 76 77 78 void AddRequiredSampler(const CStr& samplerName); 79 const std::vector<CStrIntern>& GetRequiredSampler() const { return m_RequiredSamplers; } 80 77 81 // Must be called after all AddShaderDefine and AddConditionalDefine 78 82 void RecomputeCombinedShaderDefines(); 79 83 … … 84 88 CTexturePtr m_DiffuseTexture; 85 89 86 90 SamplersVector m_Samplers; 91 std::vector<CStrIntern> m_RequiredSamplers; 87 92 88 93 CStrIntern m_ShaderEffect; 89 94 CShaderDefines m_ShaderDefines; -
source/graphics/ObjectEntry.cpp
149 149 model->GetMaterial().AddSampler(CMaterial::TextureSampler(samp->m_SamplerName, texture)); 150 150 } 151 151 152 const std::vector<CStrIntern>& requiredSamplers = model->GetMaterial().GetRequiredSampler(); 153 for (auto it : requiredSamplers) 154 { 155 bool found = false; 156 for (auto sampit : m_Samplers) 157 if (sampit.m_SamplerName == it) 158 { 159 found = true; 160 break; 161 } 162 if (!found) 163 { 164 LOGERROR("Actor %s: required texture sampler %s not found (material %s)", m_ModelName.string8().c_str(), it.string().c_str(), m_Base->m_Material.string8().c_str()); 165 } 166 } 167 152 168 // calculate initial object space bounds, based on vertex positions 153 169 model->CalcStaticObjectBounds(); 154 170 -
source/graphics/ObjectBase.cpp
164 164 if (se.Name == at_file) 165 165 samp.m_SamplerFile = VfsPath("art/textures/skins") / se.Value.FromUTF8(); 166 166 else if (se.Name == at_name) 167 samp.m_SamplerName = se.Value;167 samp.m_SamplerName = CStrIntern(se.Value); 168 168 } 169 169 currentVariant->m_Samplers.push_back(samp); 170 170 } … … 459 459 460 460 // Same for samplers, though perhaps not strictly necessary: 461 461 for (std::vector<CObjectBase::Samp>::iterator it = var.m_Samplers.begin(); it != var.m_Samplers.end(); ++it) 462 variation.samplers.erase(it->m_SamplerName );462 variation.samplers.erase(it->m_SamplerName.string()); 463 463 for (std::vector<CObjectBase::Samp>::iterator it = var.m_Samplers.begin(); it != var.m_Samplers.end(); ++it) 464 variation.samplers.insert(make_pair(it->m_SamplerName , *it));464 variation.samplers.insert(make_pair(it->m_SamplerName.string(), *it)); 465 465 } 466 466 467 467 return variation; -
source/graphics/MaterialManager.cpp
58 58 EL(shader); 59 59 EL(uniform); 60 60 EL(renderquery); 61 EL(required_texture); 61 62 EL(conditional_define); 62 63 AT(effect); 63 64 AT(if); 65 AT(define); 64 66 AT(quality); 65 67 AT(material); 66 68 AT(name); … … 180 182 { 181 183 material.AddRenderQuery(attrs.GetNamedItem(at_name).c_str()); 182 184 } 185 else if (token == el_required_texture) 186 { 187 material.AddRequiredSampler(attrs.GetNamedItem(at_name)); 188 if (!attrs.GetNamedItem(at_define).empty()) 189 material.AddShaderDefine(CStrIntern(attrs.GetNamedItem(at_define)), str_1); 183 190 } 191 } 184 192 185 193 material.RecomputeCombinedShaderDefines(); 186 194 -
source/graphics/Material.cpp
60 60 m_RenderQueries.Add(key); 61 61 } 62 62 63 void CMaterial::AddRequiredSampler(const CStr& samplerName) 64 { 65 CStrIntern string(samplerName); 66 m_RequiredSamplers.push_back(string); 67 } 68 69 63 70 // Set up m_CombinedShaderDefines so that index i contains m_ShaderDefines, plus 64 71 // the extra defines from m_ConditionalDefines[j] for all j where bit j is set in i. 65 72 // This lets GetShaderDefines() cheaply return the defines for any combination of conditions.