You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
739 B
30 lines
739 B
//========== Copyright (c) Valve Corporation, All rights reserved. ==========//
|
|
//
|
|
// Purpose: Common pixel shader code for decaltexture usage
|
|
//
|
|
// $NoKeywords: $
|
|
//
|
|
//===========================================================================//
|
|
|
|
#ifndef COMMON_DECALTEXTURE_FXC_H_
|
|
#define COMMON_DECALTEXTURE_FXC_H_
|
|
|
|
|
|
// decal blend modes
|
|
float3 TextureCombineDecal( float3 baseColor, float4 decalColor, float3 decalLighting )
|
|
{
|
|
#if ( DECAL_BLEND_MODE == 0 )
|
|
{
|
|
baseColor.rgb = ( decalColor.rgb * decalLighting * decalColor.a ) + ( baseColor.rgb * ( 1.0f - decalColor.a) );
|
|
}
|
|
#elif ( DECAL_BLEND_MODE == 1 )
|
|
{
|
|
baseColor.rgb = baseColor.rgb * decalColor.rgb;
|
|
}
|
|
#endif
|
|
|
|
return baseColor;
|
|
}
|
|
|
|
|
|
#endif // COMMON_DECALTEXTURE_FXC_H_
|