I can't figure out how to make Ursina procedural models look the same as mesh-based models.
from ursina import *
from ursina import shaders
app = Ursina()
L1 = DirectionalLight(color=color.white)
L1.setHpr((0, 0, 0))
e = Entity(model=Cube(), x=-2, color=color.green)
e = Entity(model='cube', x=2, color=color.red)
_ed = EditorCamera(rotation_speed = 200, panning_speed=200)
app.run()
Produces the following result:
Green and red cubes but green is black"

What am I missing? Why is the green cube not lit by the directional light?
I have tried using different shaders included in Ursina but it did not solve the problem.
Adding a call to generate_normals() seems to fix the problem: