Skip to content

Commit 824efa2

Browse files
committed
fix misinput
1 parent 2f5bb62 commit 824efa2

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ The game has a particle bug on the AMD CPU after the 64-bit release. This fork f
55
.pak need to update when dnshader changes (dnshaders2.dat). The dll checks if the specific shader is still the same hash. So updating the dll will be "rarely".
66

77
## List of Fixes
8-
* Added Particle fix for AMD CPUs
9-
* Added Simplified Grass
10-
* Added No VolumeFog and RadialBlur
11-
* Added Simplified Volume Tex with little differences on color (ex. ML tornado)
8+
**High:**
9+
- Added Particle fix for AMD CPUs
10+
- Added Simplified Grass
11+
- Added No VolumeFog and RadialBlur
12+
- Added Simplified Volume Tex with little differences on color (ex. ML tornado)
13+
- Add fixed shadow (shadow holes)
14+
15+
**Low:**
16+
- Added Particle fix for AMD CPUs
17+
- Added Simplified Volume Tex with little differences on color (ex. ML tornado)
18+
- Added Simplified ground
19+
- Added Simplified default
1220

1321
## Note
1422
Simplified in this context is hopefully less instruction count/ISA and GPU usage.

impl.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreateVertexShader(
115115
TerrainB = true;
116116
log("Terrain found");
117117
}
118-
return procs->CreateVertexShader(pDevice, FIXED_PROP_SHADOW_SHADER, sizeof(FIXED_PROP_SHADOW_SHADER), pClassLinkage, ppVertexShader);
118+
return procs->CreateVertexShader(pDevice, LOW_VS_TERRAIN_SHADER, sizeof(LOW_VS_TERRAIN_SHADER), pClassLinkage, ppVertexShader);
119119

120120
}
121121
else if (std::equal(DefaultShader.begin(), DefaultShader.end(), hash)) {
@@ -144,7 +144,7 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreatePixelShader(
144144
static constexpr std::array<uint32_t, 4> GrassShader = { 0xb2f29488, 0x210994ca, 0x07510660, 0x301d1575 };
145145
static constexpr std::array<uint32_t, 4> ShadowShader = { 0xbb5a2d0a, 0x29d139b7, 0x40992005, 0xf3b46588 };
146146
static constexpr std::array<uint32_t, 4> TerrainShader = { 0x74a9f538, 0x75cb0ce6, 0x3da09498, 0x7bc641bd };
147-
static constexpr std::array<uint32_t, 4> DefaultShader = { 0x5cbbb737, 0x265384da, 0x36d6d037, 0x1b052f54d };
147+
static constexpr std::array<uint32_t, 4> DefaultShader = { 0x5cbbb737, 0x265384da, 0x36d6d037, 0x1b052f54 };
148148

149149
const uint32_t* hash = reinterpret_cast<const uint32_t*>(reinterpret_cast<const uint8_t*>(pShaderBytecode) + 4);
150150

@@ -181,6 +181,10 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreatePixelShader(
181181

182182
}
183183
#else
184+
else if (std::equal(TerrainShader.begin(), TerrainShader.end(), hash)) {
185+
186+
return procs->CreatePixelShader(pDevice, LOW_FS_TERRAIN_SHADER, sizeof(LOW_FS_TERRAIN_SHADER), pClassLinkage, ppPixelShader);
187+
}
184188
else if (std::equal(DefaultShader.begin(), DefaultShader.end(), hash)) {
185189

186190
return procs->CreatePixelShader(pDevice, SIMPLIFIED_FS_DEFAULT_SHADER, sizeof(SIMPLIFIED_FS_DEFAULT_SHADER), pClassLinkage, ppPixelShader);

0 commit comments

Comments
 (0)