fix template formatting

hopefully it all matches now

Revert "fix template formatting"

This reverts commit 79aa4436ef330e8754755044ce3ebf9549c557ae.

fix template formatting

hopefully it all matches now
3rd times a charm  hopefully...lol
This commit is contained in:
medievil1 2024-01-20 20:54:49 -05:00
parent a03d50df56
commit b20db36e15
2 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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