actually still need corner sdf sample with sufficient softness as well

This commit is contained in:
Ryan Fleury
2024-01-29 15:54:47 -08:00
parent afe105da31
commit 83e8bb8ddd
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -8730,9 +8730,9 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions)
// rjf: draw line before next-to-execute line
{
R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0,
box->parent->rect.y0 - box->font_size*0.075f,
box->parent->rect.y0 - box->font_size*0.125f,
box->rect.x0 + box->font_size*260*u->alive_t,
box->parent->rect.y0 + box->font_size*0.075f),
box->parent->rect.y0 + box->font_size*0.125f),
v4f32(u->thread_color.x, u->thread_color.y, u->thread_color.z, 0),
0, 0, 1);
inst->colors[Corner_00] = inst->colors[Corner_01] = u->thread_color;
@@ -8797,9 +8797,9 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions)
// rjf: draw line before next-to-execute line
{
R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0,
box->parent->rect.y0 - box->font_size*0.075f,
box->parent->rect.y0 - box->font_size*0.125f,
box->rect.x0 + ui_top_font_size()*250.f*u->alive_t,
box->parent->rect.y0 + box->font_size*0.075f),
box->parent->rect.y0 + box->font_size*0.125f),
v4f32(u->color.x, u->color.y, u->color.z, 0),
0, 0, 1.f);
inst->colors[Corner_00] = inst->colors[Corner_01] = u->color;
@@ -184,7 +184,7 @@ str8_lit_comp(
" \n"
" // rjf: sample for corners\n"
" float corner_sdf_t = 1;\n"
" if(vertex2pixel.corner_radius_px > 0)\n"
" if(vertex2pixel.corner_radius_px > 0 || vertex2pixel.softness_px > 0.75f)\n"
" {\n"
" float corner_sdf_s = rect_sdf(sdf_sample_pos,\n"
" vertex2pixel.rect_half_size_px - float2(vertex2pixel.softness_px*2.f, vertex2pixel.softness_px*2.f),\n"
+1 -1
View File
@@ -183,7 +183,7 @@ ps_main(Vertex2Pixel vertex2pixel) : SV_TARGET
// rjf: sample for corners
float corner_sdf_t = 1;
if(vertex2pixel.corner_radius_px > 0)
if(vertex2pixel.corner_radius_px > 0 || vertex2pixel.softness_px > 0.75f)
{
float corner_sdf_s = rect_sdf(sdf_sample_pos,
vertex2pixel.rect_half_size_px - float2(vertex2pixel.softness_px*2.f, vertex2pixel.softness_px*2.f),