Skip to content

Instantly share code, notes, and snippets.

@neon-izm
Created November 10, 2017 16:36
Show Gist options
  • Save neon-izm/02cee805cba8735b87f6a93916e90cb9 to your computer and use it in GitHub Desktop.
Save neon-izm/02cee805cba8735b87f6a93916e90cb9 to your computer and use it in GitHub Desktop.
16-235範囲に縮められた動画ファイルの色を0-255に展開するシェーダー
//16-235 to 0- 255
INLINE HALF3 ClampRangeToFullRagne(HALF3 col)
{
//0.0627450= ( 16.0 / 255.0)
//1.1643835616= (255.0 / 219.0)
col.r = (col.r - 0.0627450) * 1.1643835616;
col.g = (col.g - 0.0627450) * 1.1643835616;
col.b = (col.b - 0.0627450) * 1.1643835616;
return col;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment