[fix] Fixed an issue that Actor wasn't drawn.
This commit is contained in:
parent
8b4e4535a1
commit
37a1a122e5
@ -56,15 +56,17 @@ class ActorProgram {
|
|||||||
|
|
||||||
out vec4 pixel_;
|
out vec4 pixel_;
|
||||||
|
|
||||||
float line(float ux, float px, float a) {
|
float line(float u, float p, float a) {
|
||||||
return
|
return
|
||||||
(1 - smoothstep(0, 0.003, abs(ux - px)));
|
(1-smoothstep(0, 0.003, abs(u-p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
float alpha =
|
||||||
|
line(uv_.x, pos.x, accel.x) +
|
||||||
|
line(uv_.y, pos.y, accel.y);
|
||||||
pixel_ = color;
|
pixel_ = color;
|
||||||
pixel_.a *=
|
pixel_.a *= clamp(alpha, 0, 1);
|
||||||
clamp(0, 1, line(uv_.y, pos.y, accel.y) + line(uv_.x, pos.x, accel.x));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user