mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-28 06:37:58 +03:00
Misc. shader adjustments
This commit is contained in:
parent
69fa4a0064
commit
bb030629bb
@ -55,7 +55,7 @@ struct VS_INPUT
|
|||||||
struct VS_OUTPUT
|
struct VS_OUTPUT
|
||||||
{
|
{
|
||||||
float4 projPos : POSITION;
|
float4 projPos : POSITION;
|
||||||
#if !defined( _X360 )
|
#if !defined( _X360 ) && !defined( SHADER_MODEL_VS_3_0 ) && !INTRO
|
||||||
float fog : FOG;
|
float fog : FOG;
|
||||||
#endif
|
#endif
|
||||||
float2 baseTexCoord : TEXCOORD0;
|
float2 baseTexCoord : TEXCOORD0;
|
||||||
@ -105,10 +105,9 @@ VS_OUTPUT main( const VS_INPUT v )
|
|||||||
o.projPos = vProjPos;
|
o.projPos = vProjPos;
|
||||||
vProjPos.z = dot( float4( worldPos, 1 ), cViewProjZ );
|
vProjPos.z = dot( float4( worldPos, 1 ), cViewProjZ );
|
||||||
|
|
||||||
o.worldPos_projPosZ = float4( worldPos, vProjPos.z );
|
o.worldPos_projPosZ = float4( worldPos.xyz, vProjPos.z );
|
||||||
#if !defined( _X360 )
|
#if !defined( _X360 )&& !defined( SHADER_MODEL_VS_3_0 ) && !INTRO
|
||||||
// Set fixed-function fog factor
|
o.fog = CalcFixedFunctionFog( worldPos, g_FogType );
|
||||||
o.fog = CalcFog( worldPos, vProjPos, g_FogType );
|
|
||||||
#endif
|
#endif
|
||||||
// Needed for specular
|
// Needed for specular
|
||||||
o.worldVertToEyeVector_Darkening.xyz = cEyePos - worldPos;
|
o.worldVertToEyeVector_Darkening.xyz = cEyePos - worldPos;
|
||||||
|
@ -24,11 +24,11 @@ struct PS_INPUT
|
|||||||
float3 eyeToVertVector : TEXCOORD0;
|
float3 eyeToVertVector : TEXCOORD0;
|
||||||
float4 vertexColor : COLOR;
|
float4 vertexColor : COLOR;
|
||||||
|
|
||||||
#if PARALLAXCORRECT
|
float4 worldPos_projPosZ : TEXCOORD1; // Necessary for pixel fog
|
||||||
float3 worldSpaceNormal : TEXCOORD1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float4 worldPos_projPosZ : TEXCOORD2; // Necessary for pixel fog
|
#if PARALLAXCORRECT
|
||||||
|
float3 worldSpaceNormal : TEXCOORD2;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 main( PS_INPUT i ) : COLOR
|
float4 main( PS_INPUT i ) : COLOR
|
||||||
|
@ -28,11 +28,11 @@ struct VS_OUTPUT
|
|||||||
float3 eyeToVertVector : TEXCOORD0;
|
float3 eyeToVertVector : TEXCOORD0;
|
||||||
float4 vertexColor : COLOR;
|
float4 vertexColor : COLOR;
|
||||||
|
|
||||||
#if PARALLAXCORRECT
|
float4 worldPos_projPosZ : TEXCOORD1; // Necessary for pixel fog
|
||||||
float3 worldNormal : TEXCOORD1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float4 worldPos_projPosZ : TEXCOORD2; // Necessary for pixel fog
|
#if PARALLAXCORRECT
|
||||||
|
float3 worldNormal : TEXCOORD2;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
VS_OUTPUT main( const VS_INPUT v )
|
VS_OUTPUT main( const VS_INPUT v )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user