Alpha channel problem on DirectX 10/11

  • Fu-Bama
  • Topic Author
More
6 years 1 month ago #1 by Fu-Bama Alpha channel problem on DirectX 10/11 was created by Fu-Bama
It seems that DirectX 10/11 has a problem with writing or reading float4 SV_Target alpha channel.
Effect TiltShift.fx writes to alpha channel at first pass and at second reads from it. The effect does not work on DX10 11 games creating blocky artifacts.
It looks like if the alpha channel was lower than 8-bit and stretched along V axis.
Everything works perfect on DX9 / OpenGL.

Please Log in or Create an account to join the conversation.

  • crosire
More
6 years 1 month ago - 6 years 1 month ago #2 by crosire Replied by crosire on topic Alpha channel problem on DirectX 10/11
ReShade reuses the backbuffer created by the game. It's possible to create those with the B8G8R8X8 format, which basically means "store 32-bit per pixel, but ignore the alpha value". If the games you tested this with happen to create their swapchain with this format, then artifacts can occur when attempting to use the alpha channel anyway. This technically applies to DX9/OpenGL too. The safest option in that case is to use separate texture instead of the backbuffer.

You can find out if the games in question use a format without alpha channel by searching the log ReShade creates for "swap chain description" and then check the "Format" value from the table. Format 88 (DXGI_FORMAT_B8G8R8X8_UNORM) and 93 (DXGI_FORMAT_B8G8R8X8_UNORM_SRGB) don't have an alpha channel, anything else should be fine.

If this is not the case, then something else is broken, in which case please report back.
Last edit: 6 years 1 month ago by crosire.
The following user(s) said Thank You: brussell, Fu-Bama

Please Log in or Create an account to join the conversation.

  • Fu-Bama
  • Topic Author
More
6 years 1 month ago #3 by Fu-Bama Replied by Fu-Bama on topic Alpha channel problem on DirectX 10/11
Here's the log section:
Warning: Spoiler!

I will go with separate texture.

Please Log in or Create an account to join the conversation.

  • crosire
More
6 years 1 month ago #4 by crosire Replied by crosire on topic Alpha channel problem on DirectX 10/11
So the reason it didn't work here is not because there is no alpha channel, but that the alpha channel is just two bits wide. Format 24 is DXGI_FORMAT_R10G10B10A2_UNORM. So the data you put there loses a lot of information between passes.

Please Log in or Create an account to join the conversation.

  • Marty McFly
More
6 years 1 month ago #5 by Marty McFly Replied by Marty McFly on topic Alpha channel problem on DirectX 10/11
Can that happen on DX9 as well? For some reason, my MXAO spazzes out when using it on GTASA (DX9) lately, only on Windows 10. The alpha channel seems to be rounded to 4 distinct values, which RGB10A2 would explain, but GTASA always used RGBA8..

Please Log in or Create an account to join the conversation.

  • crosire
More
6 years 1 month ago #6 by crosire Replied by crosire on topic Alpha channel problem on DirectX 10/11
Technically yes. There is D3DFMT_A2B10G10R10 (31). So if the log says that "BackBufferFormat" is 31, then the same would happen in D3D9. But I don't know of any game that used a 10-bit backbuffer in the D3D9 era.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.