Just curious if it would be possible to have a feature that can allow users to assign a custom texture for a newly created dynamic light that you can define in the GLDEFS lump. https://zdoom.org/wiki/GLDEFS
if a custom texture is to be used with the newly created dynamic light, the user will need to define what texture is to be used for this particular light and the location of the texture, something similar to the material setup.
if no custom texture is to be defined then possibly just make the engine revert back to the gzdoom default textures that are located in the GLstuff folder.
the reason for the request is i have been working on liquid shaders (Liquid texture pack V6.7) and this idea could be useful for adding a custom texture to a dedicated dynamic light that you can place in a map.
which i would then also like to take it one step further and assign a custom shader to the newly defined dynamic light texture, which would be used to create the final water caustic animation that the new light will then project in the area.
Rather then using ANIMDEFS for the animation shaders are great for minimum gpu vram usage, but ANIMDEFS can still be useful in certain situations.
I am sure with a bit of creativity, users could find other uses for a feature like this from simple realistic looking flash lights (that use the gzdoom cone / dynamic spot lights) or for creative map decoration.
such as custom shadow projection effects through wire fences / movie theater projector etc.
this is just something i have just thought of today and im not sure if this feature has been requested before in the past. and if it's a viable feature for the engine.
here is an example on what i am thinking, just on a more bare bones level for gzdoom.
Example where just static textures can be used.
Code: Select all
pointlight WaterCaustic
{
color 0.5 0.5 0.8
size 256
offset 0 0 0
Use_texture "Textures / Lights / WATERLT.png " // this tells gzdoom to overly like a hires texture or just override the original texture, for this newly defined texture.
if you was to add a shader to the point light water caustic texture to create an animation effect. possibly something like this.
Code: Select all
material texture WATERLT
{
shader "shaders/Watercausticr.fp"
texture Diffuse "textures/Lights/Watercaustic.png"
texture lightmask "textures/Lights/lightmask.png" // possibly used to lower brightness of the water caustic texture near the edges