Maya’s documentation provides a very vague paragraph describing how to use 2d placement nodes inside a HLSL shader:
Supporting texture placement into HLSL shaders
Because texture lookup is performed by the hardware shading code itself, Maya cannot provide automatic support for its native texture placement nodes.If you wish to use Maya’s texture placement nodes with your hardware shaders, you have to implement the texture placement calculations within your shader code and then expose the placement parameters as uniforms on the shader. The attributes representing these texture placement uniform parameters can then be connected to the corresponding attributes on Maya’s texture placement node, allowing artists to use the node as they would for a native Maya shader.
Can anyone elaborate a little bit on what they are talking about? I am completely confused about to take advantage of the normal relationship between 2d placement nodes and file nodes.
The best i’ve been able to do is declare a bunch of Global Variables in my shader and link the placement node attributes directly to the shader, but this bypasses the normal connections and required alot of extra scriptig to automatically setup.