- Home /
Adjust Brightness Screen
Hello everyone,
I was wondering if anyone knew how to make one of those Adjust Brightness screens that you see in a lot of games, specifically horror games. I figure I have to use a slider, but I am not quite sure what I am adjusting. Something in Post Processing maybe? Also not sure exactly how to set up the image that is supposed to show.
If you don't know what I mean, here is an example:
There is a post exposure option in color grading in post processing. Via script, edit the post exposure value to match the slider's.
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.PostProcessing;
public class SetBrightness : $$anonymous$$onoBehaviour {
public PostProcessingProfile ppprof;
public Slider brightnessSlider;
void Start() {
ppprof = transform.GetComponent<PostProcessingBehaviour>().profile;
}
void Update() {
//Access colorgrading option here.postexposure = brightnessSlider.value;
}
}
Attach this script to Camera which should have postprocessbehaviour
Answer by ThatCreepyGuyInTheCorner · Feb 06, 2020 at 11:56 AM
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/simple-lut-adjuster-51762#reviews this free asset helped me make my brightness settings, it has a bunch of camera effects that can be accessed from scripts and that includes brightness.
Answer by haseeb5639 · Feb 06, 2020 at 06:40 AM
https://docs.unity3d.com/2019.2/Documentation/ScriptReference/Screen-brightness.html
May be it helps you.
Actually this doesn't work when compiled (test 2019.4.3f1 LTS). Nor does setting the ColorGrading Gamma/Gain. They work in editor though.
Your answer
Follow this Question
Related Questions
Reading a color from an image 2 Answers
Contrast and brightness via image effect 2 Answers
Callibration Scene for HDRP 0 Answers
My sand texture is strangely bright. 0 Answers
Lighting, brightness 1 Answer