mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-23 06:36:54 +00:00
42 lines
1.3 KiB
V Shell
42 lines
1.3 KiB
V Shell
|
vs.1.1
|
||
|
|
||
|
# DYNAMIC: "DOWATERFOG" "0..1"
|
||
|
# DYNAMIC: "SKINNING" "0..1"
|
||
|
|
||
|
#include "macros.vsh"
|
||
|
|
||
|
;------------------------------------------------------------------------------
|
||
|
; Vertex blending
|
||
|
;------------------------------------------------------------------------------
|
||
|
&AllocateRegister( \$worldPos );
|
||
|
&SkinPosition( $worldPos );
|
||
|
|
||
|
;------------------------------------------------------------------------------
|
||
|
; Transform the position from world to view space
|
||
|
;------------------------------------------------------------------------------
|
||
|
|
||
|
&AllocateRegister( \$projPos );
|
||
|
|
||
|
dp4 $projPos.x, $worldPos, $cViewProj0
|
||
|
dp4 $projPos.y, $worldPos, $cViewProj1
|
||
|
dp4 $projPos.z, $worldPos, $cViewProj2
|
||
|
dp4 $projPos.w, $worldPos, $cViewProj3
|
||
|
mov oPos, $projPos
|
||
|
|
||
|
;------------------------------------------------------------------------------
|
||
|
; Fog
|
||
|
;------------------------------------------------------------------------------
|
||
|
|
||
|
&CalcFog( $worldPos, $projPos );
|
||
|
&FreeRegister( \$projPos );
|
||
|
&FreeRegister( \$worldPos );
|
||
|
|
||
|
;------------------------------------------------------------------------------
|
||
|
; Texture coordinates
|
||
|
;------------------------------------------------------------------------------
|
||
|
|
||
|
dp4 oT0.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_0
|
||
|
dp4 oT0.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_1
|
||
|
|
||
|
|