0
Fixed
Float2 output broken on code node
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.
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
0
Answer
Fixed
Freya Holmér (Developer) 11 years ago
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.
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.
Customer support service by UserEcho