API Reference › Light › Light.clear_normals
method

Light.clear_normals

Light.clear_normals()

Clears the normal buffer set by Light.normal, so every pixel is flat again (lit by distance only). Call it once per frame before re-stamping the surfaces that should shade by facing this frame — the same clear-then-register rhythm as Light.clear_occluders. A no-op if no normal was ever stamped.

Example

program Demo {
  property Wall { x: int = 0, y: int = 0 }
  model Block { Wall }
  handler Render phase Update {
    Screen.clear(0)
    Light.clear_normals()
    Light.normal(60, 50, 16, 24, 0.7, 0.0)
    Light.point(120, 62, 90, Color.rgb(255, 240, 200), 1.0)
    Screen.show()
  }
}
← All symbols