mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 20:40:35 +00:00
better rounded rect
This commit is contained in:
parent
0d448ad761
commit
dbbd9383e7
2 changed files with 5 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue