mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 09:45:59 +01:00
fix fade corner artifacts
This commit is contained in:
parent
16afa2c422
commit
cb2989cec5
1 changed files with 8 additions and 10 deletions
|
@ -34,8 +34,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
|
||||||
|
|
||||||
distances = distances / 4.0;
|
distances = distances / 4.0;
|
||||||
|
|
||||||
gl_FragColor = )#" + colorVarName + R"#( * distances;
|
)#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pixCoord[1] > bottomRight[1]) {
|
} else if (pixCoord[1] > bottomRight[1]) {
|
||||||
|
@ -66,8 +65,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
|
||||||
|
|
||||||
distances = distances / 4.0;
|
distances = distances / 4.0;
|
||||||
|
|
||||||
gl_FragColor = )#" + colorVarName + R"#( * distances;
|
)#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,8 +100,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
|
||||||
|
|
||||||
distances = distances / 4.0;
|
distances = distances / 4.0;
|
||||||
|
|
||||||
gl_FragColor = )#" + colorVarName + R"#( * distances;
|
)#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pixCoord[1] > bottomRight[1]) {
|
} else if (pixCoord[1] > bottomRight[1]) {
|
||||||
|
@ -134,8 +131,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
|
||||||
|
|
||||||
distances = distances / 4.0;
|
distances = distances / 4.0;
|
||||||
|
|
||||||
gl_FragColor = )#" + colorVarName + R"#( * distances;
|
)#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,11 +172,13 @@ void main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vec4 pixColor = v_color;
|
||||||
|
|
||||||
vec2 pixCoord = fullSize * v_texcoord;
|
vec2 pixCoord = fullSize * v_texcoord;
|
||||||
|
|
||||||
)#" + ROUNDED_SHADER_FUNC("v_color") + R"#(
|
)#" + ROUNDED_SHADER_FUNC("pixColor") + R"#(
|
||||||
|
|
||||||
gl_FragColor = v_color;
|
gl_FragColor = pixColor;
|
||||||
})#";
|
})#";
|
||||||
|
|
||||||
inline const std::string TEXVERTSRC = R"#(
|
inline const std::string TEXVERTSRC = R"#(
|
||||||
|
|
Loading…
Reference in a new issue