mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
better rounded rect
This commit is contained in:
parent
0d448ad761
commit
dbbd9383e7
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue