Misc. shader adjustments

This commit is contained in:
Blixibon 2021-04-23 10:23:53 -05:00
parent 69fa4a0064
commit bb030629bb
3 changed files with 12 additions and 13 deletions

View File

@ -55,7 +55,7 @@ struct VS_INPUT
struct VS_OUTPUT
{
float4 projPos : POSITION;
#if !defined( _X360 )
#if !defined( _X360 ) && !defined( SHADER_MODEL_VS_3_0 ) && !INTRO
float fog : FOG;
#endif
float2 baseTexCoord : TEXCOORD0;
@ -105,10 +105,9 @@ VS_OUTPUT main( const VS_INPUT v )
o.projPos = vProjPos;
vProjPos.z = dot( float4( worldPos, 1 ), cViewProjZ );
o.worldPos_projPosZ = float4( worldPos, vProjPos.z );
#if !defined( _X360 )
// Set fixed-function fog factor
o.fog = CalcFog( worldPos, vProjPos, g_FogType );
o.worldPos_projPosZ = float4( worldPos.xyz, vProjPos.z );
#if !defined( _X360 )&& !defined( SHADER_MODEL_VS_3_0 ) && !INTRO
o.fog = CalcFixedFunctionFog( worldPos, g_FogType );
#endif
// Needed for specular
o.worldVertToEyeVector_Darkening.xyz = cEyePos - worldPos;

View File

@ -24,11 +24,11 @@ struct PS_INPUT
float3 eyeToVertVector : TEXCOORD0;
float4 vertexColor : COLOR;
#if PARALLAXCORRECT
float3 worldSpaceNormal : TEXCOORD1;
#endif
float4 worldPos_projPosZ : TEXCOORD1; // Necessary for pixel fog
float4 worldPos_projPosZ : TEXCOORD2; // Necessary for pixel fog
#if PARALLAXCORRECT
float3 worldSpaceNormal : TEXCOORD2;
#endif
};
float4 main( PS_INPUT i ) : COLOR

View File

@ -28,11 +28,11 @@ struct VS_OUTPUT
float3 eyeToVertVector : TEXCOORD0;
float4 vertexColor : COLOR;
#if PARALLAXCORRECT
float3 worldNormal : TEXCOORD1;
#endif
float4 worldPos_projPosZ : TEXCOORD1; // Necessary for pixel fog
float4 worldPos_projPosZ : TEXCOORD2; // Necessary for pixel fog
#if PARALLAXCORRECT
float3 worldNormal : TEXCOORD2;
#endif
};
VS_OUTPUT main( const VS_INPUT v )