diff --git a/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsl b/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsl index 6bcb9908b..a33d695f3 100644 --- a/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsl +++ b/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsl @@ -245,7 +245,7 @@ TextureArgs ExecuteTextureStage( float4 main(const PS_INPUT input) : COLOR { -// Calculate the fog factor + // Calculate the fog factor // Some of this might be better done in the pixel shader? float fogFactor; if (state.FogTableMode == FOG_TABLE_NONE) @@ -257,8 +257,8 @@ float4 main(const PS_INPUT input) : COLOR { if (state.FogTableMode == FOG_TABLE_LINEAR) fogFactor = (state.FogEnd - input.iFog) / (state.FogEnd - state.FogStart); // (end - d) / (end - start) if (state.FogEnable == 0) - fogFactor = 1; - + fogFactor = 1; + TexCoords = input.iT; // Each stage is passed and returns diff --git a/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsli b/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsli index 4c8d2ccbe..0262ca56d 100644 --- a/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsli +++ b/src/core/hle/D3D8/Direct3D9/FixedFunctionPixelShader.hlsli @@ -67,8 +67,8 @@ namespace FixedFunctionPixelShader { const int SAMPLE_2D = 1; const int SAMPLE_3D = 2; const int SAMPLE_CUBE = 3; - - // https://docs.microsoft.com/en-us/windows/win32/direct3d9/fog-formulas + + // https://docs.microsoft.com/en-us/windows/win32/direct3d9/fog-formulas const float FOG_TABLE_NONE = 0; const float FOG_TABLE_EXP = 1; const float FOG_TABLE_EXP2 = 2; @@ -127,14 +127,14 @@ namespace FixedFunctionPixelShader { struct FixedFunctionPixelShaderState { alignas(16) arr(stages, PsTextureStageState, 4); - alignas(16) float4 TextureFactor; - alignas(16) float SpecularEnable; - alignas(16) float FogEnable; - alignas(16) float3 FogColor; - alignas(16) float FogTableMode; - alignas(16) float FogDensity; - alignas(16) float FogStart; - alignas(16) float FogEnd; + alignas(16) float4 TextureFactor; + alignas(16) float SpecularEnable; + alignas(16) float FogEnable; + alignas(16) float3 FogColor; + alignas(16) float FogTableMode; + alignas(16) float FogDensity; + alignas(16) float FogStart; + alignas(16) float FogEnd; }; #ifdef __cplusplus } // FixedFunctionPixelShader namespace