Skip to content

Instantly share code, notes, and snippets.

@tomaka
Created August 7, 2017 08:53
Show Gist options
  • Select an option

  • Save tomaka/0ef19530fdbf6a1d30ebf9c0bcd0df72 to your computer and use it in GitHub Desktop.

Select an option

Save tomaka/0ef19530fdbf6a1d30ebf9c0bcd0df72 to your computer and use it in GitHub Desktop.

Revisions

  1. tomaka created this gist Aug 7, 2017.
    3 changes: 3 additions & 0 deletions srgb.glsl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    vec3 srgb_to_linear(vec3 c) {
    return mix(c / 12.92, pow((c + 0.055) / 1.055, vec3(2.4)), step(0.04045, c));
    }