-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix walls being too bright in OpenGL #590
base: master
Are you sure you want to change the base?
Conversation
- Divide by 32 instead of 33 - Remove rounding of light level and light index - Revert color index calculation (I don't see any difference myself, but maybe there's a reason for it)
If you look at this #588, you'll notice that I'm getting a different result than shown here. |
@Kappa971 Are you autoloading the WAD shared in Discord? That's an older version of what I have here. |
I'm not autoloading any WADs, except widescreen STBAR. |
This is what I get at 1920x1080 resolution: Could you test this WAD (or build dsda-doom.wad with this change) to see how it looks? |
@Kappa971 so your concern is that it isnt a 1:1 match with software? Well it never will be. OpenGL is just a completely different way to render. |
I dont know how to answer that. The no-fix behaviour is also different for me, but the fixed one is the same as the screenshots you guys sent. Interestingly, the no-fix looks very similar, just slightly different, to the new one in my machine (M1 Mac). OpenGL (fix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems right, and definitely gives better results
This reverts some of the changes that were made to the indexed lightmode shader when it was refactored for smooth fade mode (#409). In my testing these end up making the indexed lightmode less accurate to software.
Note that this does not address floors and ceilings being different between software and OpenGL, but walls should be pretty close.
Comparison screenshots:
![sw](https://private-user-images.githubusercontent.com/2382506/406777476-6d319afa-4a1e-4578-a707-4719c7e2f9c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTI4ODksIm5iZiI6MTczODkxMjU4OSwicGF0aCI6Ii8yMzgyNTA2LzQwNjc3NzQ3Ni02ZDMxOWFmYS00YTFlLTQ1NzgtYTcwNy00NzE5YzdlMmY5YzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDcxNjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjM4Y2JhMDNjNjM0OTc4NTBmNjU2OWY2Mjc2NWI3ZDFkZTViMzg0OGY4NDY2ZDZhMjQwNjljNjRhZjhhNTYxZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.SJ0wZuZ6f3jNQ2iruFLqN6bFqOk_P1oAXZ6BRfjqRq4)
Software
OpenGL, without this change
![gl-before](https://private-user-images.githubusercontent.com/2382506/406777493-9334d494-238c-40d7-b650-329f908e43d8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTI4ODksIm5iZiI6MTczODkxMjU4OSwicGF0aCI6Ii8yMzgyNTA2LzQwNjc3NzQ5My05MzM0ZDQ5NC0yMzhjLTQwZDctYjY1MC0zMjlmOTA4ZTQzZDgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDcxNjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWI5MjZmMDNjNjcwOTNjYjM5NzZlOGM2MTUzOThhYzAyNGNiNzUyMTZjZTc5NGE3MmI3OTFlMWQ4MTU2M2Y3MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.mO5PaiQXSAytCIKpWqRIbs2Gwsw8Se1kpgBaQUAujC8)
OpenGL, with this change
![gl-after](https://private-user-images.githubusercontent.com/2382506/406777507-a2379b67-47c0-4fd2-be69-019a270e7271.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTI4ODksIm5iZiI6MTczODkxMjU4OSwicGF0aCI6Ii8yMzgyNTA2LzQwNjc3NzUwNy1hMjM3OWI2Ny00N2MwLTRmZDItYmU2OS0wMTlhMjcwZTcyNzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDcxNjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9M2EyZDZhMzViZjcxYjRmZjVhMTVjNWM1YmY4YzlhNjMyNWJjOTk0OThhZDM5NDFhNGMyMDk0NmQ2YTBhZmUzMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.eIO7zLLbYzFueCV5SPEYnAzGPjDYRbWfJk8r4cyFKHk)