Posted February 08, 2024 by kindeyegames
This is pretty experimental, but it adds support for a project which patches the C3 runtime to enable per fragment lighting for 3DObject.
The project is included here.
Currently only works with non-worker animation mode (if it proves promising, will add worker mode)
Look at main.js for some info on how to add and change lights (color, position, spotlight, direction, etc.)
The position of a light can be controlled, but they will all use the same offset for the control.
Only 3DObjects will be lit and work, do not use other C3 rendered objects (e.g. Sprite, 3DShape, Tilebackground, Text) - However, of course can create entire levels of 3DObjects.
HTML elements will render (e.g. button, input box)
Try it out! If you do changes to the project (js, etc.) please share, let's work on this together).