Skip to content

xyx2rgb * .01? #271

@mighdoll

Description

@mighdoll

Presumably drop the * .01 here in xyz2rgb.glsl:

const mat3 XYZ2RGB = mat3(
     3.1338561,-0.9787684, 0.0719453,
    -1.6168667, 1.9161415,-0.2289914,
    -0.4906146, 0.0334540, 1.4052427
);
vec3 xyz2rgb(const in vec3 xyz) { return XYZ2RGB * (xyz * 0.01); }

but in rgb2xyz.glsl:

const mat3 RGB2XYZ = mat3(  
    0.4360747, 0.2225045, 0.0139322,
    0.3850649, 0.7168786, 0.0971045,
    0.1430804, 0.0606169, 0.7141733);

vec3 rgb2xyz(const in vec3 rgb) { return RGB2XYZ * rgb;}

I've been adding tests for the WESL translations, and Claude spotted this while reviewing.

Metadata

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