line() not affected by lights()
in
Programming Questions
•
3 years ago
Hi all,
It appears that lines in 3D space (P3D / OPENGL) are not affected by lighting methods like directionalLight().
Is this true? If so why? And what would anyone recommend as workaround? or do I need to alter another parameter to get lights() and line() to work together. Here is a quick demo:
- size(100, 100, P3D);
- background(0);
- noStroke();
- spotLight(51, 102, 126, width/2, 0, 0, 0, 0, -1, PI/2, 2);
- directionalLight(255, 0, 67, -1, 0, 0);
- translate(width/2, height/2, -100);
- sphere(30);
- stroke(255);
- line(0,0,0,100,100,100);
Thanks
1