-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
Support for linear space rendering in R4 renderer #1576
base: dev
Are you sure you want to change the base?
Conversation
Forgot that videos in UI also require proper loading as _SRGB. |
5b2f3e4
to
20bcaf3
Compare
Fixed this. This required modifying |
Thank you for rising this. The fix addresses an important issue, however I don't think it will be enough to solve it.
Personally, I believe that over almost 20 years players got used to the vanilla game appearance, and it is questionable what benefits the fix can give them. Can be good for some realistic graphic mods though. |
Well, diffuse textures are non-linear, because they are displayed uncorrected on sRGB display in the original version. And that is pretty much expected.
I tried enabling USE_GAMMA_22 some time ago. As I remember, it was not behaving as I expected, but I don't remember details.
I didn't apply correction to light colors, to retain closer to original look. Converting light color to linear space would make lighting brighter in general.
Blending in linear space should make result little brighter than in gamma space, that's expected. Must be careful to not correct weights though.
Not familiar with them, but some change in appearance is expected.
I tried it, and it seems works correctly. Adds additional correction.
I wouldn't call this PR a fix, but a new feature. Yes, it's intended for mods, because it will require some additional artistic tweaking. That's why I made it disabled by default. It can be enabled manually from console. |
Why did you used _SRGB format for rt_Generic* rendertargets? |
Making this buffer _SRGB doesn't affect linearity of reads/writes to it through shaders. Because both such reads/writes include mapping srgb->linear and back linear->srgb. What it affects is quantization errors. Without making it _SRGB, I see color banding especially in dark areas. Couple of examples (with non-vanilla shaders) below. Look closely at dark areas. It's usually more noticeable when you move. |
-Support usage of multiple spawn_loadout sections in character descriptions (OpenXRay#1590) -Support for linear space rendering in R4 renderer (OpenXRay#1576) -Fixed "Naruto run" -Fog affects npc vision -Smopth peak -Landscape render phase (IXRAY) -Volumetric light optimization (fixed light flickering by Graff46) -Fixed visual memory manager formula -Optimazed light renderer (https://github.com/OpenXRay/xray-16/pull/1600/files) -Fixed HOM cache (dsh2dsh) -Fixed CKinematics::LL_SetBoneVisible (Anomaly)
-Support usage of multiple spawn_loadout sections in character descriptions (OpenXRay#1590) -Support for linear space rendering in R4 renderer (OpenXRay#1576) -Fixed "Naruto run" -Fog affects npc vision -Smopth peak -Landscape render phase (IXRAY) -Volumetric light optimization (fixed light flickering by Graff46) -Fixed visual memory manager formula -Optimazed light renderer (https://github.com/OpenXRay/xray-16/pull/1600/files) -Fixed HOM cache (dsh2dsh) -Fixed CKinematics::LL_SetBoneVisible (Anomaly)
5b2ec76
to
6fffce9
Compare
The game is rendered in gamma space, which is not correct - the lighting is affected by non-linear mapping.
So I added optional linear space rendering. To achieve this: