updates
This commit is contained in:
@@ -30,9 +30,9 @@ void main() {
|
||||
float interior_corner_radius = frag_border_radius * interior_radius_reduce_f * interior_radius_reduce_f;
|
||||
|
||||
float inside_d = roundedRectSDF(
|
||||
frag_dest_position,
|
||||
frag_dest_center,
|
||||
interior_half_size - softness_padding,
|
||||
frag_dest_position,
|
||||
frag_dest_center,
|
||||
interior_half_size - softness_padding,
|
||||
interior_corner_radius);
|
||||
|
||||
|
||||
@@ -41,15 +41,15 @@ void main() {
|
||||
}
|
||||
|
||||
float dist = roundedRectSDF(
|
||||
frag_dest_position,
|
||||
frag_dest_center,
|
||||
frag_dest_half_size - softness_padding,
|
||||
frag_dest_position,
|
||||
frag_dest_center,
|
||||
frag_dest_half_size - softness_padding,
|
||||
frag_border_radius);
|
||||
|
||||
// For texturing later
|
||||
float sample = 1;
|
||||
|
||||
float sdf_factor = 1.0f - smoothstep(0, 2*frag_softness, dist);
|
||||
float sdf_factor = 1 - smoothstep(0, 2*frag_softness, dist);
|
||||
|
||||
pixel_color = frag_color * sample * sdf_factor * border_factor;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user