hl2_src-leak-2017/src/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.vsh
BotoX 60f625f414 import hl2_src from full.7z
source: magnet:?xt=urn:btih:21DDA6847DDE983F2F8063739249D2D1D09A5DDA
2020-12-25 16:26:23 +01:00

39 lines
974 B
GLSL

vs.1.1
# DYNAMIC: "DOWATERFOG" "0..1"
#include "macros.vsh"
;------------------------------------------------------------------------------
; Vertex blending
;------------------------------------------------------------------------------
&AllocateRegister( \$projPos );
dp4 $projPos.x, $vPos, $cModelViewProj0
dp4 $projPos.y, $vPos, $cModelViewProj1
dp4 $projPos.z, $vPos, $cModelViewProj2
dp4 $projPos.w, $vPos, $cModelViewProj3
mov oPos, $projPos
alloc $worldPos
if( $DOWATERFOG == 1 )
{
; Get the worldpos z component only since that's all we need for height fog
dp4 $worldPos.z, $vPos, $cModel2
}
&CalcFog( $worldPos, $projPos );
free $worldPos
&FreeRegister( \$projPos );
;------------------------------------------------------------------------------
; Texture coordinates
;------------------------------------------------------------------------------
dp4 oT0.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_0
dp4 oT0.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_1