Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
dnblank123 committed Jun 19, 2024
1 parent 7733bc5 commit fced13e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# D-fix [Dragon Nest-Fix]
You can download the file [here](https://github.com/dnblank123/D-fix/releases), or nightly release [here](https://github.com/dnblank123/D-fix/actions).

## The main issue in Dragon Nest
The game has a particle bug on the AMD CPU after the 64-bit release. This fork fixes it. Additionally, removing unnecessary calculation on low graphics.

Expand Down
3 changes: 2 additions & 1 deletion impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreateVertexShader(
static constexpr std::array<uint32_t, 4> PlayerShader = { 0xe8462ec7, 0xd4f1f7cc, 0x68fe051f, 0xe00219ea };

const auto* hash = std::bit_cast<const uint32_t*>(std::bit_cast<const uint8_t*>(pShaderBytecode) + 4);

const bool AMD = IsAMD();

if (std::equal(ParticleShader1.begin(), ParticleShader1.end(), hash)) {
if (!Particle1B) {
Particle1B = true;
Expand Down Expand Up @@ -265,6 +265,7 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreatePixelShader(
#define HOOK_PROC(iface, object, table, index, proc) \
hookProc(object, #iface "::" #proc, &table->proc, &iface ## _ ## proc, index)


template<typename T>
void hookProc(void* pObject, const char* pName, T** ppOrig, T* pHook, uint32_t index) {
void** vtbl = *std::bit_cast<void***>(pObject);
Expand Down

0 comments on commit fced13e

Please sign in to comment.