LWJGL Forum

Programming => OpenGL => Topic started by: matan45 on December 09, 2017, 07:33:34

Title: Post Process Effects
Post by: matan45 on December 09, 2017, 07:33:34
how can I do Eye Adaptation? I didn't find any resource about it   
Title: Re: Post Process Effects
Post by: KaiHH on December 09, 2017, 13:19:33
you eyes will do it automatically for you. see https://en.wikipedia.org/wiki/Adaptation_(eye)
Title: Re: Post Process Effects
Post by: matan45 on December 10, 2017, 08:01:22
no examples of glsl
Title: Re: Post Process Effects
Post by: KaiHH on December 10, 2017, 11:57:59
you already mentioned a link in another post about Tone Mapping of HDR images: https://learnopengl.com/#!Advanced-Lighting/HDR
What you need to be doing is called "Tone Mapping", so google a bit for it. For example: "Tone Mapping OpenGL" or "Tone Mapping GLSL", and you will surely find something.
Title: Re: Post Process Effects
Post by: matan45 on December 10, 2017, 16:23:30
this is a lot of tone mapping functions which one is the eye Adaptation?
Title: Re: Post Process Effects
Post by: KaiHH on December 10, 2017, 17:58:25
You first have to understand how one would implement eye adaptation. You should _really_ use your google skills more often.
One great example of what eye adaptation should consist of is given here: https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/AutomaticExposure/
So, you would first have to build a histogram of your scene's luminances and then find the lowest/average/highest values to guide your tone mapping.