style: shader style fixes
This commit is contained in:
parent
1a9f17054d
commit
6ef904a960
3 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ void main() {
|
||||||
vec2 center = gl_FragCoord.xy - position - half_size;
|
vec2 center = gl_FragCoord.xy - position - half_size;
|
||||||
float distance = roundedBoxSDF(center, half_size - half_thickness, radius + half_thickness);
|
float distance = roundedBoxSDF(center, half_size - half_thickness, radius + half_thickness);
|
||||||
float smoothedAlphaOuter = 1.0 - smoothstep(-1.0, 1.0, distance - half_thickness);
|
float smoothedAlphaOuter = 1.0 - smoothstep(-1.0, 1.0, distance - half_thickness);
|
||||||
// Create an inner circle that isn't as anti-aliased as the outer ring
|
// Create an inner circle that isn't as anti-aliased as the outer ring
|
||||||
float smoothedAlphaInner = 1.0 - smoothstep(-1.0, 0.5, distance + half_thickness);
|
float smoothedAlphaInner = 1.0 - smoothstep(-1.0, 0.5, distance + half_thickness);
|
||||||
gl_FragColor = mix(vec4(0), v_color, smoothedAlphaOuter - smoothedAlphaInner);
|
gl_FragColor = mix(vec4(0), v_color, smoothedAlphaOuter - smoothedAlphaInner);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue