predator_envmaptimesenvmapmask.vsh

来自「hl2 source code. Do not use it illegal.」· VSH 代码 · 共 39 行

VSH
39
字号
vs.1.1

#include "macros.vsh"

local( $worldPos, $worldNormal, $projPos, $reflectionVector );

;------------------------------------------------------------------------------
; Vertex blending
;------------------------------------------------------------------------------
&AllocateRegister( \$worldPos );
&AllocateRegister( \$worldNormal );
&SkinPositionAndNormal( $g_numBones, $worldPos, $worldNormal );

;------------------------------------------------------------------------------
; Transform the position from world to proj 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 );

&ComputeReflectionVector( $worldPos, $worldNormal, "oT0" );

&FreeRegister( \$worldPos );
&FreeRegister( \$worldNormal );

; Modulation color
mov oD0, $cModulationColor

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?