Team-Doominati / Doominati

Avoiding the sins of ZDoom since 2016.
GNU General Public License v2.0
7 stars 1 forks source link

Lighting #47

Open marrub-- opened 7 years ago

marrub-- commented 7 years ago

This depends on geometry and spatial information much like AI, and will be hard to work out until later stages.

marrub-- commented 7 years ago

In particular I have found issues with this such as "I don't know what I'm doing" and "oh god how even", so while I want to say this should be done via user shaders, I have no idea! This is still not an issue though, and will probably not be for a while, but research must be done on this.

DavidPH commented 7 years ago

One option is to give RenderThinker and Sector a color that tints the resulting texture and let the modder figure out how to set all that up. But that's really primitive and not very good looking for certain uses.

marrub-- commented 7 years ago

That's not a problem really, if you want light levels like Doom that's super easy. The issue is when you want actual shadow casting and point lights, which is what I'm focusing on here.

Kyle873 commented 7 years ago

Personally, I would consider this fairly low priority at the moment, but still taken into consideration while working on rendering stuff. Ultimately I think the end result should be easy to use via scripting, like having something like a LightThinker maybe? However, how feasible this would actually end up being in terms of implementation may mean a lot more involvement would be required on the user's part, but I would imagine that lighting/processing/etc would be faster implemented in the engine itself and exposed instead of being done entirely via scripting. Maybe it would be useful to investigate how other 2D engines implement their lighting systems? Two that immediately come to mind would be Nez and Ethanon.

marrub-- commented 7 years ago

No, it would be just as fast with scripting, because it's done on the GPU, not the CPU. If you needed a point light thinker you could just use a RenderThinker and have information about it be passed to the shader somehow.

Thanks for the suggestions, I'll go peek around their source code when I'm done fixing explosions.