Last active
March 14, 2023 21:11
-
-
Save drdaxxy/77b1ff884ecba47dc705768999e6e01d to your computer and use it in GitHub Desktop.
FOR PLAYERS: Use this instead (press Ctrl+Shift+Backspace in game for the option): http://steamcommunity.com/app/524220/discussions/0/135512104777399045
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* If you're an end user (i.e. you don't know what to do with this file): | |
* You'll probably want to download Kaldaien's mod, which includes these changes. | |
* | |
* http://steamcommunity.com/app/524220/discussions/0/135512104777399045 | |
* | |
*/ | |
HRESULT __stdcall CreateBufferHook(void *This, D3D11_BUFFER_DESC *pDesc, | |
D3D11_SUBRESOURCE_DATA *pInitialData, | |
ID3D11Buffer **ppBuffer) { | |
if (pDesc != NULL && pDesc->StructureByteStride == 96 && | |
pDesc->ByteWidth == 96 * 128) { | |
pDesc->ByteWidth = 96 * 16; | |
} | |
return CreateBufferOriginal(This, pDesc, pInitialData, ppBuffer); | |
} | |
HRESULT __stdcall CreateShaderResourceViewHook( | |
void *This, ID3D11Resource *pResource, | |
D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, | |
ID3D11ShaderResourceView **ppSRView) { | |
if (pDesc != NULL && pDesc->ViewDimension == D3D_SRV_DIMENSION_BUFFEREX && | |
pDesc->BufferEx.NumElements == 128) { | |
ID3D11Buffer *pBuf; | |
HRESULT res = | |
pResource->QueryInterface(__uuidof(ID3D11Buffer), (void **)&pBuf); | |
if (SUCCEEDED(res)) { | |
D3D11_BUFFER_DESC bufferDesc; | |
pBuf->GetDesc(&bufferDesc); | |
if (bufferDesc.ByteWidth == 96 * 16) { | |
pDesc->BufferEx.NumElements = 16; | |
} | |
} | |
} | |
return CreateShaderResourceViewOriginal(This, pResource, pDesc, ppSRView); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@earthgta2010 you don't use this, you use Kaldaien's mod, which includes this: http://steamcommunity.com/app/524220/discussions/0/135512104777399045
Press Ctrl+Shift+Backspace in game to change the global illumination quality setting.