Skip to content

encodings_pars_fragment: Bug in vector/matrix multiplication  #15621

@liamlangli

Description

@liamlangli

vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;

when i use these lines of code to convert logluv color space data to linear space. render result shows that there is only blue channel preserved. so I read the original page above. The problem is

float3 vRGB = mul(Xp_Y_XYZp, InverseM);

is not the same as

vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;

.
so i move cLogLuvInverseM matrix to the left, problem solved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions