#include "refblend.template" #include "sort.template" #include "clamp.template" tessSize( @tessSize@ ); #include "textureAtlas.template" hasEditorMaterial( @hasEditorMaterial@ ); allocLightmap( 1 ); forModel( 1 ); forWorld( 0 ); #include "statebits.template" #if "@blendFunc@" == "Add" #error "additive not allowed on ambient materials" #endif #define DYN_FOLIAGE_SUFFIX "_dfoliage" #if @scorchable@ #define SCORCH_SUFFIX "_sco" #else #define SCORCH_SUFFIX "" #endif #if "@blendFunc@" == "Replace" #if "@alphaTest@" == "Always" techniqueSet( "ambient_r0c0" + DYN_FOLIAGE_SUFFIX + SCORCH_SUFFIX ); #else techniqueSet( "ambient_t0c0" + DYN_FOLIAGE_SUFFIX + SCORCH_SUFFIX ); #endif #elif "@blendFunc@" == "Blend" techniqueSet( "ambient_b0c0" + DYN_FOLIAGE_SUFFIX + SCORCH_SUFFIX ); #else #error "blendFunc '@blendFunc@' with alphaTest '@alphaTest@' not supported for ambient materials" #endif textureTable { #if "$colorMap$" == "" #error "colorMap may not be blank in ambient materials" #endif "colorMap" = streamable map( "@tileColor@", "@filterColor@", "$colorMap$", @nopicmipColor@ ) "@formatColor@" : "colorMap"; "normalMap" = map( "tile both", "nomip nearest", "$identityNormalMap", true ) "" : "normalMap"; } constantTable { "colorTint" = float4( @,colorTint@ ); "dynamicFoliageFlexibility" = float1( @dynamicFoliageFlexibility@ ); "dynamicFoliageSunDiffuseMinMax" = float2( @dynamicFoliageSunDiffuseMin@, @dynamicFoliageSunDiffuseMax@ ); } refImage( "$colorMap$" );