Canvas Renderer

Canvas Renderer

202k Downloads

[Suggestion] Colored light system

paulevsGitch opened this issue ยท 1 comments

commented

Hi, I know that this topic was active several times, and such kind of lighting is not in priority development, but I have a small working approach that I want to suggest for the Canvas. The most colored lights mods use point lights and a shader to render them, this causes issues with large amount of lights and have issues with "light leaking" when light can be seen threw wall. I suggest another approach - use voxel lighting system (like MC use) and pass the resulted color into the shaders with 3D textures. This actually works in my tests (link) and I get a nice result even with the simple lighting algorithm (3x3x3 blocks around light source are filled with proper light). I think something like this but with better approach can be a good part of the Canvas.

My approach screenshots (lamps mod and BYG mod blocks):

2021-03-03_00 07 16
2021-03-04_22 08 42

commented

Thank you for your suggestion. The rendering of colored lights will be controlled by the active pipeline configuration and shaders. Pipeline authors will have much flexibility, including the option to not implement colored lights. At least one of the pipelines that ships with Canvas will eventually support them.

Pipeline authors will be able to choose how lighting data is conveyed to the shaders: via vertex data, volume textures (as you seem to suggest), or as light lists. Perhaps other options will be devised. There's been some interest from the community in helping to advance this feature, so it may come sooner rather than later.