{ inherit decalBlend parms { stageSort sortDecal } state { blend GL_ZERO GL_ONE_MINUS_SRC_COLOR depthfunc GL_GREATER alphamask depthmask backSided } hlsl_fp { #include "decalMerged_fragment.inc" half4 final = tex2D( $transMap, texcoord ); final.w *= fragment.color.w; // fade based on time final.w *= edgefade; // apply edge fade // Apply fog final.xyz = lerp( _half3( 1.0 ), final.xyz, fog ); result.color.xyz = ( _half3( 1.0 ) - final.xyz ) * ( final.w * 2.0 ); result.color.w = 1.0; } }