Aller au contenu
ducon2016

[FIX] Chaos Legion Broken Textures

Messages recommandés

Chaos Legion uses DirectX 8 and had broken texturing on recent hardware. Just put the attached dll in the game folder and it will now work fine.

Without Fix:

WithoutFix.jpg.9c5e6cc5595ec344bb77ba04dda458a6.jpg

 

With Fix:

WithFix.jpg.d0d2f9fc1bf8c5cbfc845ff141ed4619.jpg

 

d3d8.7z

  • Like 2
  • Thanks 3

Partager ce message


Lien à poster
Partager sur d’autres sites

Any chance you can write down the technical details of what this patch does?

 

I'm talking to the developer of dgVoodoo2 about Chaos Legion's problems and am wondering if that's something that could be implemented in dgVoodoo2.

Partager ce message


Lien à poster
Partager sur d’autres sites
6 minutes ago, ZellSF said:

Any chance you can write down the technical details of what this patch does?

 

I'm talking to the developer of dgVoodoo2 about Chaos Legion's problems and am wondering if that's something that could be implemented in dgVoodoo2.

 

Yes of course, happy to share, and dgVoodoo2 could do that without a problem. I just round the height of the textures to the next power of 2 in the CreateTexture method. For example if the height is 41, I change it to 64 when the texture is created. If already a power of 2, I do not change anything. I will share the source code when I am back, I am traveling for a couple of weeks.

Modifié par ducon2016

Partager ce message


Lien à poster
Partager sur d’autres sites
On 5/12/2018 at 2:26 PM, ZellSF said:

Any chance you can write down the technical details of what this patch does?

 

I'm talking to the developer of dgVoodoo2 about Chaos Legion's problems and am wondering if that's something that could be implemented in dgVoodoo2.

 

As promised here is the d3d8to9 fixed to work with Chaos Legion, so you can use reshade and any other cool tools to make it look better. The code is included so that you can share with the dgVoodoo2 guy. Really simple, I just modified the CreateTexture function.

 

unsigned long upper_power_of_two(unsigned long v)
{
	v--;
	v |= v >> 1;
	v |= v >> 2;
	v |= v >> 4;
	v |= v >> 8;
	v |= v >> 16;
	return v + 1;
}

HRESULT STDMETHODCALLTYPE Direct3DDevice8::CreateTexture(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, Direct3DTexture8 **ppTexture)
{
	Height = upper_power_of_two(Height);

 

d3d8to9-ChaosLegion.7z

Modifié par ducon2016
  • Thanks 1

Partager ce message


Lien à poster
Partager sur d’autres sites

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant

×