Linear gamma

  • crabshank
  • Topic Author
More
6 years 2 weeks ago - 4 years 7 months ago #1 by crabshank Linear gamma was created by crabshank
A very simple shader that reverse and applies transfer functions:





Then re-grade as you see fit, I suggest applying gamma (choosing your own value or algorithm could lead to better results) first.

The image above uses the inverse (sRGB) setting.

Download  here
Last edit: 4 years 7 months ago by crabshank. Reason: Updated
The following user(s) said Thank You: Wicked Sick, sajittarius, jas01, Deathmedic, SIMJEDI, Cul

Please Log in or Create an account to join the conversation.

  • crabshank
  • Topic Author
More
5 years 10 months ago #2 by crabshank Replied by crabshank on topic sRGB to Linear RGB (approximation)
UPDATE: Included both transforms (to Linear and inverse).

Please Log in or Create an account to join the conversation.

  • sajittarius
More
5 years 10 months ago #3 by sajittarius Replied by sajittarius on topic sRGB to Linear RGB (approximation)
Would it be possible to make a version of this with an adjustable gamma slider? I tried it in Star Wars Jedi: Fallen Order with HDR on and its amazing but could use a tiny tweak to the gamma values.

This shader works in HDR, whilst many other gamma ones (LevelsPlus, Tonemap, etc) do not, so i could see it helping in a lot of games where the HDR seems washed out.
The following user(s) said Thank You: crabshank

Please Log in or Create an account to join the conversation.

  • crabshank
  • Topic Author
More
5 years 10 months ago #4 by crabshank Replied by crabshank on topic sRGB to Linear RGB (approximation)
UPDATE: Separated transforms into separate techniques.

@sajittarius using my grey gamma shader after this should help.
The following user(s) said Thank You: sajittarius

Please Log in or Create an account to join the conversation.

  • sajittarius
More
5 years 10 months ago #5 by sajittarius Replied by sajittarius on topic sRGB to Linear RGB (approximation)
i think the grey gamma shader was what i was looking for in the first place (it works great for what i want just by tweaking that shader)

thank you :)

Please Log in or Create an account to join the conversation.

  • crabshank
  • Topic Author
More
5 years 1 month ago #6 by crabshank Replied by crabshank on topic Linear gamma
I have included more transfer functions in this shader, check my other shaders as I have added many more colour spaces to most of them.

Please Log in or Create an account to join the conversation.

  • crabshank
  • Topic Author
More
5 years 1 month ago #7 by crabshank Replied by crabshank on topic Linear gamma
Included a second instance so that one can easily convert back after applying other filters.

Please Log in or Create an account to join the conversation.

  • SIMJEDI
More
4 years 9 months ago #8 by SIMJEDI Replied by SIMJEDI on topic Linear gamma
Thanks for making this.

Can we please get an update. It looks like it is working (I think) in 4.8.2

I had to change DrawText_mod.fxh to DrawText.fxh in line 15 in order for it to compile and load. But a large box with letters in yellow and a warning pops up when I hover over it's name in the shaders list.

Thanks in advance.

Please Log in or Create an account to join the conversation.

  • aen313
More
4 years 7 months ago #9 by aen313 Replied by aen313 on topic Linear gamma
как скачать Linear gamma.fx  ?

Please Log in or Create an account to join the conversation.

  • Tojkar
More
4 years 7 months ago #10 by Tojkar Replied by Tojkar on topic Linear gamma

aen313 wrote: как скачать Linear gamma.fx  ?

 

OP has a link to the relevant GitHub page.

Please Log in or Create an account to join the conversation.