Why directionallight cannot show anything

void draw()
{

background(0,0,0);
translate(400,400,-mouseY);
fill(0,255,0);
directionalLight(255,0,0,10,0,0);
noStroke();
sphere(100.0);
}

The color red for the sphere seems to work better:

void setup() {
  size(800, 800, P3D);
}

void draw() {
  background(0, 0, 0);

  translate(400, 400, -mouseY);

  directionalLight(255, 0, 0, 10, 0, 0);

  fill(255, 0, 0);
  noStroke();
  sphere(100.0);
}

Hello,

Shedding some light on this subject…

Colors and Vision

:)

Thanks!very helpful!

Thanks!very helpful!

Thanks!very helpful!

1 Like