-
Notifications
You must be signed in to change notification settings - Fork 49
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
is there a possibility you can add more than just vibrance as an option? #8
Comments
This will take some time to implement as the NVAPI is not a nice thing to work with ;-). I might get to it within the next two weeks. No promises though |
Thanks |
I've looked into this and it seems that you need a specific nda version of the NVAPI for this. I've contacted NVIDIA for this issue but it might take a while. |
Nice, thanks for trying. |
Guessing you couldn't implemented it, ty tough. |
I still don't have an answer from NVIDIA. No idea if they'll ever answer me. |
Same, they never replied back when I contacted them. |
"This will take some time to implement as the NVAPI is not a nice thing to work with" tell me about it :) i would also just like to add my vote to support gamma and brightness (if possible) |
I still don't have an answer on my ticket. I'll open another now. |
much appreciated - thanks ----- Original Message ----- I still don't have an answer on my ticket. I'll open another now. Reply to this email directly or view it on GitHub: |
@juvlarN tough you were dead, thanks for trying homie. |
They didn't respond to me yet. I actually doubt they ever will. |
Am I right in assuming that you need the same specific nvapi version for contrast control as for gamma? |
What about adding those features for AMD? This will hugely increase the value of the app. Thanks |
It's been two years - Do you think you could look into this again? According to a comment on this page there's a public (no nda required) version at the bottom of the page. I would really like to be able to use a brightness/gamma control. |
The commentator was wrong when he posted that comment in 2011. The NDA
version of the NVAPI is still required for getting/setting the VideoState.
I have just downloaded the latest released NVAPI and there is still no
information about these functions nor any documentation about digital
vibrance itself.
2017-12-03 1:19 GMT+01:00 nalmeth <[email protected]>:
… It's been two years - Do you think you could look into this again?
According to a comment on this page
<https://stackoverflow.com/questions/5119477/how-can-i-program-a-nvidia-brightness-slider-like-the-volume-slider>
there's a public (no nda required) version at the bottom of the page. I
would really like to be able to use a brightness/gamma control.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH4uKedvFdjKx6OOnJJnHZL5Pga_YZp2ks5s8ekigaJpZM4EPl0N>
.
|
This app is basically perfect. But I'd love to be able to control gamma for specific apps as well (more gamma in csgo). Do we still face the same NVAPI limitations today? |
@fragtion still has not changed, just double checked for the latest version (r410) |
Still not possible? |
Hmm this is interesting: https://devtalk.nvidia.com/default/topic/1057935/nvapi/nvapi-nda-request/ Nvidia says that their control panel uses MSFT API directly. Tried this app: https://github.com/cmdf/extra-gamma Seems to work, but I need to unplug one of the monitors. I believe that first parameter in the SetDeviceGammaRamp function from ms api needs to point to correct monitor. Ok, I found how to select monitor to change gamma on, didn't test it tho: https://stackoverflow.com/questions/34486842/how-to-change-the-gamma-ramp-of-a-single-display-monitor-nvidia-config I also think "Other applications control color settings" should maybe be selected in nvidia control panel for this? hmm. Maybe there is still hope! 👍 |
SetDeviceGammaRamp, SetMonitorBrightness and the other high level monitor configuration functions provided by Microsofts API are not really what is of interested for this project. They access and change the configuration of the actual physical device, e.g. your gaming monitor. This is an entirely different approach from what vibranceGUI is using in its current versions. The current design is to force the GPU to override certain settings and that's it. Changing this behaviour might lead to confusion when users expect the NVIDIA/AMD settings to be overriden but in fact their monitor settings are changed. Also, I am pretty sure that the NVIDIA guy in their forums is wrong. The NVIDIA driver is capable of overlaying even more brightness/contrast/gamma on top of what is being set by the Microsoft API (or your physical menu on the monitor). So while there is a slight chance that there are some different Microsoft APIs that are being used by NVIDIA, I really doubt it. I have tested the GetMonitorBrightness/SetMonitorBrightness functions and they reflect what my monitor displays when I access the physical menu of the monitor. The NVIDIA Control Panel can overlay even more. I have recorded a quick video of this. As you can see in the video, the brightness added by the NVIDIA driver (set by utilizing the NVIDIA Control Panel) is different from what is being reflected by the Microsoft APIs: https://imgur.com/EUJ0H7t So while changing brightness/contrast/gamma might be achieved by using the Microsoft APIs, this might not really what we want. To sum up, it is possible to do this by using the Microsoft APIs but not the best solution and a workaround at best. |
Hmm, SetMonitorBrightness seems to change monitor settings. So this is not what we want. This app was made back in 2002: https://www.majorgeeks.com/files/details/gamma_panel.html Now the question is how this 18 years old app is doing it. There must be some ancient MS API for this, somewhere. EDIT: gamma panel and nvidia control pannel override eachothers settings. So this seems like a good indicator that those two apps are writing values to the same API, My best bet is that they are both using SetDeviceGammaRamp. EDIT2: I found piece of code that converts gamma, contrast, brightness values into GammaRamp for SetDeviceGammaRamp function https://www.pcreview.co.uk/threads/adjusting-screen-contrast-through-c-code-programmatically.4038760/ |
I created helper class in attachment to fiddle around with. Example usage: static void Main(string[] args) {
int monitorId = 1; // 0 - means apply to all monitors
double level = 50; // default 50
double gamma = 10; // default 10
double brightness = 50; // default 50
double contrast = 50; // default 50
SetDeviceGammaRampHelper.ApplyGammaRamp(monitorId, level, gamma, brightness, contrast);
} It seems that NVIDIA is using slightly different scale for brightness and contrast. EDIT: Just confirmed that nvidia control panel is indeed changing values of GetDeviceGammaRamp, so that means nvidia is using MS API internally. |
Hey, I am the developer of the HeliosDisplayManagement project and I was going to add the private static ushort[] CalculateLUT(double brightness = 0.5, double contrast = 0.5, double gamma = 1)
const int dataPoints = 256;
// Limit gamma in range [0.4-2.8]
gamma = Math.Min(Math.Max(gamma, 0.4), 2.8);
// Normalize contrast in range [-1,1]
contrast = (Math.Min(Math.Max(contrast, 0), 1) - 0.5) * 2;
// Normalize brightness in range [-1,1]
brightness = (Math.Min(Math.Max(brightness, 0), 1) - 0.5) * 2;
// Calculate curve offset resulted from contrast
var offset = contrast > 0 ? contrast * -25.4 : contrast * -32;
// Calculate the total range of curve
var range = (dataPoints - 1) + offset * 2;
// Add brightness to the curve offset
offset += brightness * (range / 5);
// Fill the gamma curve
var result = new ushort[dataPoints];
for (var i = 0; i < result.Length; i++)
{
var factor = (i + offset) / range;
factor = Math.Pow(factor, 1 / gamma);
factor = Math.Min(Math.Max(factor, 0), 1);
result[i] = (ushort)Math.Round(factor * ushort.MaxValue);
}
return result;
} A while back I used the source code of this project to add vibrance control to my project. So thank you for that. By the way, if you are interested you can check out my NvAPIWrapper to change settings on the monitor via I2C bus or to change HUE. I tried to support as much of nvapi as possible. |
@Horex I can't reproduce your observation that the Nvidia Control Panel is changing the values returned by When trying to reproduce it, I have basically added some quick-n-dirty code inside of the
Then I started the application, ran the code with default values in Nvidia Control Panel applied, then changed the values in the Nvidia Control Panel, and ran the code again. Two files get created with the content of the Arrays. Just to make sure I'm not fiddling with some weird issue when joining those |
NVCP does use |
Well, take a look here:
Note that it does not matter if I close the Nvidia Control Panel after adjusting the brightness I am running Nvidia driver version 460.89. 8nv2t5t.mp4 |
Oh yeah, I see the source of confusion. |
And the other thing about the screen becoming, even more, brighter is because the algorithm used by @Horex is different from the one used by NVCP. That's why ranges are different and that's why I wrote an algorithm that works like NVCP. You can try mine and you can see that the 100% when applied with NVCP is identical to 100% when using my algorithm. |
@falahati Interesting. Do you know of a way to read out the values that the NVCP is using from the registry? Maybe even set them? At a quick glance I've found that the key edit: this blog contains some more hints on what that special registry object is about 🤔:
|
I've actually fucked around with the registry trying to achieve the same result. My hypothesis was that it was editing the registry to change these color values, but thats unfortunately not the case. I copied a before and after of my registry to see if that would change the values, but unfortunately the only thing the registry does, in my case, is change the slider positions in NvCp. However, it is worth noting that I only tried about 5 different registry values, and I gave up very quickly. Edit: Just saw this comment, ignore most of what I said about the registry above lol.
I also have some notes that might be useful while I was researching this:
To read the output of the registry I used this: If this could be added to VibranceGUI, which honestly does certainly seem possible, then that would save me, and many others a ton of time and stress. If you, by some miracle, do figure this out and add it, thank you. Hope my research proves useful in one way or another. Keep us posted! |
Suppose it's time for this issues yearly checkup? |
Hi all, I have built a new beta version This includes color settings (brightness/contrast/gamma) 🥳 Please note:
It would be great if you let me know how it goes for you. You can download the pre-release .exe here: |
Dudeeeee. Ive literally graduated High School since I posted my above comment. I will check this out tonight and report back. Thanks a ton man. |
Looks like there are a couple of issues:
|
Your comment is based on a lot of misunderstandings of how anti-cheats actually work. B) Changes to the Window's Registry gamma settings, which NVIDIA Control Panel also does, would not trigger an anti-cheat detection. If NVIDIA's calls to the MCAPI work, then there isn't any reason VibranceGUI wouldn't either. It's not like this application (nor NVCP) is making any sort of injection into the application itself, which could trigger anti-cheat detection, this is purely OS based. It's like saying changing your resolution wouldn't be possible because of the game's anti-cheat. The only difference is that VibranceGUI is process based. That is, detecting if a process is open. Based on my testing, and feel free to do your own, this feels like a process detection bug / potentially a permission issue. @juv It also seems that the digital vibrance settings seem to work fine. Some other weird behavior that I noted was that the log file only generated once for me. I uploaded that log with my comment. After that initial generation (which is when I first ran VibranceGUI, I believe), the log file did not generate at all after that. Noting the permission error in that log, I tried running VibranceGUI as an Administrator, which did not make a difference at all. |
No, vibranceGUI should work with any application running on your Windows OS. While there in theory might be some applications that forcefully override the settings made by vibranceGUI, there has not been a single application being reported to do so in this Github or my Twitter account. And vibranceGUI is totally fine to be used with/in Valorant and thousands of users have been using it in Valorant since Valorant's release. I myself played a few years of Valorant with vibranceGUI being active. VibranceGUI is not a cheat/hack kind of program. It automates a few GPU driver settings based on the application that is running in foreground. My take is this: It's virtually the same as changing the driver settings manually every time and can not really give an unfair advantage. Now, with the recent addition of the color settings, this still remains true. Any player can increase the brightness/contrast/gamma settings on their pc somehow. vibranceGUI will just make it a bit easier. You can read a more detailed breakdown on how this application works in this post from 8 years ago on reddit: https://www.reddit.com/r/GlobalOffensive/comments/502rha/comment/d71body/ |
Thanks for giving it a try and sorry that it's not working as expected for you right now. Is it possible that you can reach out to me on Twitter via direct message? It would making debugging this issue you face a bit easier. My Twitter handle is linked on the README.md of this repo. edit: just for my understanding, you did the following procedure?
Note that the color change should happen really fast, you should not really see the in-game colors being applied on your Windows screen after alt+tabbing back to Windows. And please can you add the following information:
|
Most Nvidia cards also have brightness and gamma, wondering if you can add those settings as an option.
The text was updated successfully, but these errors were encountered: