by Indecom » Thu Apr 11, 2019 2:45 am
It's been a couple of days and I've been cracking away at this task even further. Turns out that setting up a new UDMF var for this is redundant. I've gone through the source code and altered the clamping values for dynamic light sources both while reading lights from the wad/pk3/and so on, but also at the shader level. This essentially reads whatever numbers you place into your light's R,G, and B channels and anything higher than 255 is now stacked rather than immediately clamped, meaning that you can now define insanely bright lights by setting their RGB values magnitudes higher than 255. Not only have I done this but I've also implemented an alternative light attenuation model based around quadratic attenuation plus a more natural attenuation to clamp the light's effective range to that of their radius. By default standard linear attenuation is disabled, but I've added a cvar to toggle that off, to utilize the new, more natural attenuation that I've defined. In addition to that I have also added an attenuation coefficient CVar that you can use to fine tune the light attenuation to get the look that you want out of your maps.
If you want to experiment with this, have at it:
GIT Repo
Further experiments I'm planning:
Fully integrated self shadowing parallax occlusion mapping.
Rendering of volumetric materials/lights
Advanced Specular and PBR materials for sprites
Advanced rendering of image planes with PBR/Spec + depthmapping.
It's been a couple of days and I've been cracking away at this task even further. Turns out that setting up a new UDMF var for this is redundant. I've gone through the source code and altered the clamping values for dynamic light sources both while reading lights from the wad/pk3/and so on, but also at the shader level. This essentially reads whatever numbers you place into your light's R,G, and B channels and anything higher than 255 is now stacked rather than immediately clamped, meaning that you can now define insanely bright lights by setting their RGB values magnitudes higher than 255. Not only have I done this but I've also implemented an alternative light attenuation model based around quadratic attenuation plus a more natural attenuation to clamp the light's effective range to that of their radius. By default standard linear attenuation is disabled, but I've added a cvar to toggle that off, to utilize the new, more natural attenuation that I've defined. In addition to that I have also added an attenuation coefficient CVar that you can use to fine tune the light attenuation to get the look that you want out of your maps.
[youtube]uR99Qslt224[/youtube]
If you want to experiment with this, have at it:
[url=https://github.com/Igameart/gzdoom]GIT Repo[/url]
Further experiments I'm planning:
Fully integrated self shadowing parallax occlusion mapping.
Rendering of volumetric materials/lights
Advanced Specular and PBR materials for sprites
Advanced rendering of image planes with PBR/Spec + depthmapping.