mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-23 06:36:54 +00:00
38 lines
825 B
GLSL
38 lines
825 B
GLSL
vs.1.1
|
|
|
|
# DYNAMIC: "DOWATERFOG" "0..1"
|
|
|
|
#include "macros.vsh"
|
|
|
|
local( $worldPos, $worldNormal, $projPos, $reflectionVector );
|
|
|
|
&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
|
|
|
|
&AllocateRegister( \$worldPos );
|
|
|
|
; garymcthack
|
|
dp4 $worldPos.z, $vPos, $cModel2
|
|
|
|
&CalcFog( $worldPos, $projPos );
|
|
|
|
&FreeRegister( \$worldPos );
|
|
&FreeRegister( \$projPos );
|
|
|
|
;------------------------------------------------------------------------------
|
|
; Texture coordinates
|
|
;------------------------------------------------------------------------------
|
|
; base texcoords
|
|
mov oT0, $vTexCoord0
|
|
|
|
; lightmap texcoords
|
|
mov oT1, $vTexCoord1
|
|
|
|
&FreeRegister( \$worldPos ); # garymcthack
|
|
|