Integer socket support in Cycles. Int values are already supported natively in OSL...
[blender.git] / intern / cycles / kernel / osl / nodes / node_convert_from_float.osl
index 00e78f3bab400252265c1d7b3a960d8e105e6bf4..4466fbae3a6ec60dc81f0e06d1ba0d2d5d193b25 100644 (file)
 
 shader node_convert_from_float(
        float Val = 0.0,
+       output int ValInt = 0,
        output color Color = color(0.0, 0.0, 0.0),
        output vector Vector = vector(0.0, 0.0, 0.0),
        output point Point = point(0.0, 0.0, 0.0),
        output normal Normal = normal(0.0, 0.0, 0.0))
 {
+       ValInt = (int)Val;
        Color = color(Val, Val, Val);
        Vector = vector(Val, Val, Val);
        Point = point(Val, Val, Val);