linear alpha gradient
in
Programming Questions
•
2 years ago
hi,
i want to make a pseudo depth by fading out objects with a full screen size rect, but this time with a linear gradient to simulate some horizont effect.
i have this gradient:
how can i give it a alpha value?
and!
how can i have it as real vector gradient for pdf export??? i got the SWAG it might be complicated...
thank you!
i want to make a pseudo depth by fading out objects with a full screen size rect, but this time with a linear gradient to simulate some horizont effect.
i have this gradient:
- void setup(){
size(768,400,P3D);
smooth();
frameRate(30);
}
void draw(){
gradient();
}
void gradient(){
noStroke();
beginShape(QUADS);
fill(188,190,192);
vertex(0,0);
vertex(width,0);
fill(0,0,0);
vertex(width,height);
vertex(0,height);
endShape();
}
how can i give it a alpha value?
and!
how can i have it as real vector gradient for pdf export??? i got the SWAG it might be complicated...
thank you!
1
