0
Fixed

Float2 output broken on code node

msperling 11 years ago updated by Freya Holmér (Developer) 11 years ago 1
Hi Ace, today I tested the code node with the "Random Color" example from the wiki.
Input on the right was a float3 namend ObjPos.
Output on the left was a float2 for the UVs.
These were plugged into a Texture2D asset which was connected to the Diffuse of the main node. eof
ShaderForge generated the custom code function correctly. The output variable however was of type float instead of float2 resulting in a pink material error.

Answer

Answer
Fixed
This should be fixed in Beta 0.29 now :)
I'd like to clarify.
The function returned a float2.
But the fragment shader used the function like this:
float node_12 = MyFunction(input);
So where node_12 should have been of type float2 it was not. This directly results in shader compile error.
Answer
Fixed
This should be fixed in Beta 0.29 now :)