Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
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.
 
 
 
 
 
 

48 lines
1.3 KiB

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $Header: $
// $NoKeywords: $
//===========================================================================//
#include "shaderlib/cshader.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
BEGIN_SHADER_FLAGS( ViewAlpha, "Help for ViewAlpha", SHADER_NOT_EDITABLE )
BEGIN_SHADER_PARAMS
END_SHADER_PARAMS
SHADER_INIT
{
LoadTexture( BASETEXTURE );
}
SHADER_DRAW
{
SHADOW_STATE
{
pShaderShadow->EnableTexture( SHADER_SAMPLER0, true );
pShaderShadow->EnableCustomPixelPipe( true );
pShaderShadow->CustomTextureStages( 1 );
pShaderShadow->CustomTextureOperation( SHADER_TEXTURE_STAGE0,
SHADER_TEXCHANNEL_COLOR, SHADER_TEXOP_SELECTARG1,
SHADER_TEXARG_TEXTUREALPHA, SHADER_TEXARG_CONSTANTCOLOR );
pShaderShadow->CustomTextureOperation( SHADER_TEXTURE_STAGE0,
SHADER_TEXCHANNEL_ALPHA, SHADER_TEXOP_SELECTARG1,
SHADER_TEXARG_TEXTURE, SHADER_TEXARG_VERTEXCOLOR );
pShaderShadow->DrawFlags( SHADER_DRAW_POSITION | SHADER_DRAW_TEXCOORD0 );
}
DYNAMIC_STATE
{
BindTexture( SHADER_SAMPLER0, BASETEXTURE, FRAME );
SetFixedFunctionTextureTransform( MATERIAL_TEXTURE0, BASETEXTURETRANSFORM );
}
Draw( );
}
END_SHADER