mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-21 11:17:56 +03:00
7309a5f13f
This should include the latest version of every shader that was in the 2007 SDK. It also includes a smattering of debug shaders, both VR distortion shaders, and other assorted shaders that will hopefully be useful. None of these new files are included in the game shader DLL project. If you need to modify one of these shaders for use in your mod you will need to rename it so that you don't collide with the version of that shader that lives in stdshader_dx9.dll.
44 lines
1.2 KiB
GLSL
44 lines
1.2 KiB
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
|
|
|
|
dp4 oT1.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_2
|
|
dp4 oT1.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_3
|
|
|
|
mov oT2, $vTexCoord1
|
|
|
|
; Now the basetexture/basetexture2 blend uses vertex color, so send it into the psh.
|
|
mov oD0, $vColor
|