zacharycarter / zengine

2D | 3D Game development library
157 stars 13 forks source link

Lights & Lighting #22

Open define-private-public opened 6 years ago

define-private-public commented 6 years ago

Looking at example 01 right now (and anything else that uses lighting), it looks kind of clunky to use lights. Not really simple such as create light; set type; set color; set position; etc.... There's still a lot of manual things such as setting the shader variables. So I guess my question is: What is the plan for formalizing the lighting objects?

I don't think it's the most important thing to work on right now, but I'm wondering what your ideas are. I'm building the sprites to be objects that you can move around in 3D space. Once I'm done with the core stuff, I'd like to be able to be lit.

My idea is that by default there should be an ambient light (100% intensity, white) that is applied to all objects (3D meshes and 2D sprites), but can be turned off or modified. What's your idea on this?

zacharycarter commented 6 years ago

If we're going to eventually add a scenegraph to zengine I suggest we handle letting the users set-up their lighting parameters there. Until then I opt for keeping it as it is, I know it's not easy to implement but without a scene graph I don't see a better way at the moment.