В процессе. Замена if на вычисления
This commit is contained in:
@@ -11,14 +11,6 @@ uniform bool disabled = false;
|
|||||||
void fragment()
|
void fragment()
|
||||||
{
|
{
|
||||||
float w = cos(angle) * UV.x + sin(angle) * UV.y - speed * TIME;
|
float w = cos(angle) * UV.x + sin(angle) * UV.y - speed * TIME;
|
||||||
if ((floor(mod(w * divisions, stripe_bias)) < 0.0001) && disabled)
|
float rc = floor(float(mod(w * divisions, stripe_bias) < 0.0001)) * float(disabled);
|
||||||
{
|
COLOR = color_gap * rc + color_stripe * (1.0 - rc);
|
||||||
COLOR = color_gap;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
COLOR = color_stripe;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user