Skip to content

Gamma no reshade #1126

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

Merged
merged 14 commits into from
Jan 12, 2025
Merged

Gamma no reshade #1126

merged 14 commits into from
Jan 12, 2025

Conversation

iOrange
Copy link
Contributor

@iOrange iOrange commented Dec 27, 2024

Implemented Brightness (gamma ramp) as a simple 3D LUT, so even raw D3d8 device can use it, no ReShade needed

@Polymega
Copy link
Collaborator

Polymega commented Dec 28, 2024

Thank you, iOrange!!

Elisha, our original (ReShade) implementation for restoring the game's brightness selector utilized this shader:
https://github.com/elishacloud/Silent-Hill-2-Enhancements/blob/master/Resources/LiftGammaGain.fx

I'm not sure if any of our other ReShade shaders require/use LiftGammaGain but, if not, that shader file could possibly be removed from our project going forward.

@iOrange
Copy link
Contributor Author

iOrange commented Dec 28, 2024

Thanks @Polymega for testing, added small fix to support resolution scale, as well as optimized LUT generation (I'm an idiot at times) so it's smooth now and not lagging when you change brightness level in the menu.

@iOrange
Copy link
Contributor Author

iOrange commented Jan 11, 2025

@elishacloud fixed all of the issues and optimized even further. Tested by @Polymega

@elishacloud
Copy link
Owner

I see a few issues with the latest check-ins here:

  1. In the case of scaled resolutions there is an extra, unneeded CopyRects() and DrawPrimitiveUP().
  2. There is a DrawPrimitiveUP() outside the BeginScene()/EndScene() pair, which is not allowed in Direct3D9.

@elishacloud
Copy link
Owner

Ok, I fixed both of the issues. I reduced the duplication and made sure that all draw calls are between the BeginScene()/EndScene() pair. Hopefully, I did not introduce a new issue.

@elishacloud elishacloud merged commit 7f5a927 into elishacloud:master Jan 12, 2025
1 check passed
@elishacloud
Copy link
Owner

Thanks @iOrange!

@iOrange
Copy link
Contributor Author

iOrange commented Jan 15, 2025

Thanks for additional fixes @elishacloud !

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.

3 participants