Skip to content

Commit

Permalink
simplify OCIO shapers
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdyer committed Dec 19, 2014
1 parent 2180530 commit 6853fc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,8 @@ void main
output varying float aOut
)
{
float lin[3] = {rIn, gIn, bIn};

float log32f[3];
log32f[0] = lin_to_log2_32f( lin[0], middleGrey, minExposure, maxExposure);
log32f[1] = lin_to_log2_32f( lin[1], middleGrey, minExposure, maxExposure);
log32f[2] = lin_to_log2_32f( lin[2], middleGrey, minExposure, maxExposure);

const float scalar = 1.0;
rOut = log32f[0] / scalar;
gOut = log32f[1] / scalar;
bOut = log32f[2] / scalar;
rOut = lin_to_log2_32f( rIn, middleGrey, minExposure, maxExposure);
gOut = lin_to_log2_32f( gIn, middleGrey, minExposure, maxExposure);
bOut = lin_to_log2_32f( bIn, middleGrey, minExposure, maxExposure);
aOut = aIn;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ void main
)

{
const float scalar = 1.0;
rOut = log2_to_lin_32f( rIn / scalar, middleGrey, minExposure, maxExposure);
gOut = log2_to_lin_32f( gIn / scalar, middleGrey, minExposure, maxExposure);
bOut = log2_to_lin_32f( bIn / scalar, middleGrey, minExposure, maxExposure);
rOut = log2_to_lin_32f( rIn, middleGrey, minExposure, maxExposure);
gOut = log2_to_lin_32f( gIn, middleGrey, minExposure, maxExposure);
bOut = log2_to_lin_32f( bIn, middleGrey, minExposure, maxExposure);
aOut = aIn;
}

0 comments on commit 6853fc3

Please sign in to comment.