第一个版本

This commit is contained in:
xsl
2025-09-22 23:33:47 +08:00
parent a64a6715ee
commit 48517e685d
2 changed files with 2 additions and 2 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ void main() {
// 网格参数
float gridSize = 14.0; // 网格大小
float dotRadius = 7.0; // 点状半径
float dotRadius = 6.0; // 点状半径
// 计算当前片段所在的网格和网格中心坐标
vec2 gridCoord = fragPos / gridSize;
@@ -21,7 +21,7 @@ void main() {
float distanceToCenter = length(fragPos - gridCenter);
// 如果距离超过点状半径,丢弃(创建点状虚线)
if (distanceToCenter > dotRadius) {
if (distanceToCenter > dotRadius && fragColor.y > 0.5) {
discard;
}
Binary file not shown.