|
50 | 50 | <output name="rgb" type="color3" /> |
51 | 51 | </nodedef> |
52 | 52 |
|
| 53 | + <!-- adding variant with scale and bias defined as vector4 type - we may decide to remove the original version |
| 54 | + in a future MaterialX version with an upgrade function --> |
| 55 | + <nodedef name="ND_UsdUVTexture_23_vector4" node="UsdUVTexture" nodegroup="texture2d" version="2.3"> |
| 56 | + <input name="file" type="filename" value="" uniform="true" /> |
| 57 | + <input name="st" type="vector2" defaultgeomprop="UV0" /> |
| 58 | + <input name="wrapS" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" /> |
| 59 | + <input name="wrapT" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" /> |
| 60 | + <input name="fallback" type="color4" value="0, 0, 0, 1" /> |
| 61 | + <input name="scale" type="vector4" value="1, 1, 1, 1" uniform="true" /> |
| 62 | + <input name="bias" type="vector4" value="0, 0, 0, 0" uniform="true" /> |
| 63 | + <output name="r" type="float" /> |
| 64 | + <output name="g" type="float" /> |
| 65 | + <output name="b" type="float" /> |
| 66 | + <output name="a" type="float" /> |
| 67 | + <output name="rgb" type="color3" /> |
| 68 | + </nodedef> |
| 69 | + |
53 | 70 | <!-- Node: UsdPrimvarReader --> |
54 | 71 | <nodedef name="ND_UsdPrimvarReader_integer" nodegroup="geometric" node="UsdPrimvarReader"> |
55 | 72 | <input name="varname" type="string" value="" uniform="true" /> |
|
371 | 388 | <output name="rgb" type="color3" nodename="image_bias_color3" /> |
372 | 389 | </nodegraph> |
373 | 390 |
|
| 391 | + <nodegraph name="IMP_UsdUVTexture_23_vector4" nodedef="ND_UsdUVTexture_23_vector4"> |
| 392 | + <image name="image_reader" type="color4"> |
| 393 | + <input name="file" type="filename" interfacename="file" /> |
| 394 | + <input name="default" type="color4" interfacename="fallback" /> |
| 395 | + <input name="texcoord" type="vector2" interfacename="st" /> |
| 396 | + <input name="uaddressmode" type="string" interfacename="wrapS" /> |
| 397 | + <input name="vaddressmode" type="string" interfacename="wrapT" /> |
| 398 | + </image> |
| 399 | + <convert name="convert_vector4" type="vector4"> |
| 400 | + <input name="in" type="color4" nodename="image_reader" /> |
| 401 | + </convert> |
| 402 | + <multiply name="image_scale" type="vector4"> |
| 403 | + <input name="in1" type="vector4" nodename="convert_vector4" /> |
| 404 | + <input name="in2" type="vector4" interfacename="scale" /> |
| 405 | + </multiply> |
| 406 | + <add name="image_bias" type="vector4"> |
| 407 | + <input name="in1" type="vector4" nodename="image_scale" /> |
| 408 | + <input name="in2" type="vector4" interfacename="bias" /> |
| 409 | + </add> |
| 410 | + <convert name="comvert_color4" type="color4"> |
| 411 | + <input name="in" type="vector4" nodename="image_bias" /> |
| 412 | + </convert> |
| 413 | + <separate4 name="image_bias_separate" type="multioutput" nodedef="ND_separate4_color4"> |
| 414 | + <input name="in" type="color4" nodename="comvert_color4" /> |
| 415 | + </separate4> |
| 416 | + <convert name="image_bias_color3" type="color3"> |
| 417 | + <input name="in" type="color4" nodename="comvert_color4" /> |
| 418 | + </convert> |
| 419 | + <output name="r" type="float" nodename="image_bias_separate" output="outr" /> |
| 420 | + <output name="g" type="float" nodename="image_bias_separate" output="outg" /> |
| 421 | + <output name="b" type="float" nodename="image_bias_separate" output="outb" /> |
| 422 | + <output name="a" type="float" nodename="image_bias_separate" output="outa" /> |
| 423 | + <output name="rgb" type="color3" nodename="image_bias_color3" /> |
| 424 | + </nodegraph> |
| 425 | + |
374 | 426 | <!-- Node: UsdPrimvarReader --> |
375 | 427 | <nodegraph name="IMP_UsdPrimvarReader_integer" nodedef="ND_UsdPrimvarReader_integer"> |
376 | 428 | <geompropvalue name="primvar" type="integer"> |
|
0 commit comments