better rounded rect

This commit is contained in:
marauder2k7 2024-03-07 10:20:06 +00:00
parent 0d448ad761
commit dbbd9383e7
2 changed files with 5 additions and 5 deletions

View file

@ -104,7 +104,7 @@ void GuiShaderNode::renderNode(Point2I offset, const RectI& updateRect, const S3
if (mSelected)
border = mProfile->mBorderColorSEL;
drawer->drawRoundedRect(15.0f, winRect, mProfile->mFillColor, 3.0f, border);
drawer->drawRoundedRect(15.0f, winRect, mProfile->mFillColor, 5.0f, border);
// draw header
ColorI header(50, 50, 50, 128);

View file

@ -85,18 +85,18 @@ float4 main(Conn IN) : TORQUE_TARGET0
// }
toColor = IN.color;
}
sdf = abs(sdf) - halfBorder;
}
sdf = abs(sdf) / borderSize;
}
else{
fromColor = IN.color;
}
}
float alpha = smoothstep(-1.0, 1.0, sdf);
return lerp(fromColor, toColor, alpha);
}
else
{
{
return IN.color;
}
}