Skip to content

Curves(r,g,b) function does wrong interpolation #42

Open
@pastissolo

Description

Hello,
the interpolation function to generate the 255 points of the rgb channels is wrong:
glfx.js line 806 is
function splineInterpolate(points) { var interpolator = new SplineInterpolator(points); var array = []; for (var i = 0; i < 256; i++) { array.push(clamp(0, Math.floor(interpolator.interpolate(i / 255) * 256), 255)); } return array; }
the line
array.push(clamp(0, Math.floor(interpolator.interpolate(i / 255) * 256), 255));
make no sense, probably it should be:
array.push(clamp(0, Math.floor((interpolator.interpolate(i) / 255) * 256), 255));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions