Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[d3d8] Implement Dref scaling and fixed-function depth textures #3565

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AlpyneDreams
Copy link
Contributor

Part of #3411, but not a requirement for #3411 to merge.

  • Some early D3D8 games expect Dref to be on the range of [0..2^bitDepth - 1], so this adds a config option for DXSO and D3D9 fixed function to scale it back down to [0..1]. Source
  • D3D9 tests confirm that you can bind a depth texture to fixed-function, so this PR also enables that

More info:

Simplified from #3536 since we probably don't need additional shadow filtering based on videos I can find of period hardware. Only dgVoodoo2 does extra shadow filtering as far as I'm aware.

@AlpyneDreams
Copy link
Contributor Author

AlpyneDreams commented Jul 17, 2023

Windows builds failed due to 404 for Vulkan SDK. This PR should compile fine on MSVC.

@Blisto91
Copy link
Contributor

Blisto91 commented Jul 17, 2023

The Windows build error is known and have been fixed with this PR #3556

@AlpyneDreams AlpyneDreams mentioned this pull request Jul 27, 2023
13 tasks
// bind depth textures to fixed function shaders.
if (m_dxsoOptions.drefScaling)
stage.SampleDref = (m_depthTextures & (1 << idx)) != 0;
stage.SampleDref = (m_depthTextures & (1 << idx)) != 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why this is a separate commit and not just done by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants