Open Bradleyp123 opened 1 month ago
Because radiosity is a technique primarily used in 3D graphics, (and in a context where we have more control over the rendering), it wouldn't necessarily apply directly to Yoru Engine. I do plan to introduce a more global SKShader
context to all elements being drawn (or to have certain elements extend from perhaps a LitElement
or ShaderElement
class) so we have more control over rendering through the use of the Skia shading language (SkSL). If we pass relevant values from the element to a shader, along with values from an ApplicationContext
(eg. LightingContext
) we could potentially begin to work with the likes of lighting or other effects.
Since Yoru Engine has a focus on Cross platform compatibility and performance. Personally i like Radiosity, Radiosity offers Realistic shadows and light bounces, Normally it is pre computed during a maps compile process (back in the days of Source and Quake). These engines used BSP but unfortunately BSP isn't vary modern and im guessing your going to use a more modern and accessible platform. For reference Here's a small game engine that uses Radiosity lightmapping: https://www.cafu.de/![lighting1](https://github.com/Nebula-Developer/Yoru-Engine/assets/87635756/32340aeb-ae37-4662-bdf7-0e0b4ad8f112)
Here's a photo of Source engine of what also uses radiosity lightmaps:![AcerNito_DirectX9_hl2 exe](https://github.com/Nebula-Developer/Yoru-Engine/assets/87635756/a9ca2b99-d492-4b99-b76c-a674e39b2f23)
Radiosity has issues with compile times (on my custom version of source has a decade long lightmap compile time) but you can use CUDA to accelerate this (https://github.com/darthryking/SilkRAD). Its due to how it is calculated on CPU, and how you have to devide the map into patches of whom become luxels (lightmap texture).
There is also a real-time implementation of radiosity. https://www.youtube.com/watch?v=0-0aMo_qkGo
But these are things to be done wayyyy in the future.