Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Materials / Hooking up Texture Placement Nodes in HLSL Shaders
  RSS 2.0 ATOM  

Hooking up Texture Placement Nodes in HLSL Shaders
Rate this thread
 
33271
 
Permlink of this thread  
avatar
  • Total Posts: 14
  • Joined: 06 October 2006 12:37 PM

I would like my HLSL shaders to retrieve the information in the 2d-Placement Nodes attached to the File Nodes. Maya’s documenation provides an extremely vague paragraph describing how to achieve this:

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 on this? The farthest I’ve gotten is to add my own Global Variables and manually feed the various attributes of the 2d-placement node directly into the Shader, by-passing the normal connection between placement node and file node…



Replies: 0