0
Under review

Code node and dx11

Brad Herman 10 years ago updated 10 years ago 4
My  shader is breaking when we use direct X11 tessellation and a code node. Are code nodes  not compatible with direct X11 only shaders? 
Under review
It should work, but it all depends on what you type in there. You may also not be able to use the code node in the DX11 inputs
Currently it's color texture math. I bring in 3 texture2d and one UV and I output a float 4 to dx11 offset. 
 All the math is pretty basic, just a lot easier in code.  So yes I'm going into a dx11 hook. 
dx11 tessellation just has a user value going in. 
It could simply be that the function needs to be defined before the tessellation passes. Although you should use float3 in DX11 displacement though, that could break it as well

Looks like we also get a magenta error shader if we use the vertex offset field with anything from a code node that has a Texture Asset / sampler2D as an input. Tried sampler2D and vectors as output.

This simple network works:


This one hangs shader forge if I connect that green Out to the Tex input.  Just trying to pass a sampler2D in and out.


If I don't have sampler2D as the output it won't hang shader forge, however we get broken magenta shader.