MaterialX icon indicating copy to clipboard operation
MaterialX copied to clipboard

Triplanar with different colorspaces gets wrong color transform

Open rasmusbonnedal opened this issue 1 year ago • 0 comments

Description

When using the <triplanarprojection> node (which has 3 filename inputs) and different colorspaces on the different inputs only one colorspace transform is generated.

To reproduce

Create a <triplanarprojection> node with different colorspaces on the different input and observe the generated OSL code.

image repro-triplanar.zip

Result

Generated OSL code:

    NG_triplanarprojection_color3(triplanarprojection_filex_, triplanarprojection_filey_, triplanarprojection_filez_, triplanarprojection_layerx, triplanarprojection_layery, triplanarprojection_layerz, triplanarprojection_default, geomprop_Pobject_out1, geomprop_Nobject_out1, triplanarprojection_upaxis, triplanarprojection_blend, triplanarprojection_filtertype, triplanarprojection_framerange, triplanarprojection_frameoffset, triplanarprojection_frameendaction, triplanarprojection_out);
    color triplanarprojection_out_cm_out = color(0.0);
    NG_srgb_texture_to_lin_rec709_color3(triplanarprojection_out, triplanarprojection_out_cm_out);

Expected result

I'd expect that three colorspace transforms would be emitted, one for each file input, with the corresponding source colorspace for each file input.

rasmusbonnedal avatar Jan 13 '25 11:01 rasmusbonnedal