Can't download? Try this link instead:
https://forum.zdoom.org/viewtopic.php?f ... 8#p1148678
Here's a Sonic The Fighters/Superhot style model lighting shader for Zandronum 3.0 (Which might work with map geometry, haven't tested). Thanks to
Kevin over at learnopengles.com for his great help, without it I wouldn't have done this at all.
STF_Lighting_Shader_Zandro.zip
For usage, set up a brightmapped model as you normally would in GLDEFS and MODELDEFS, but set "map" to "shader/null.png" (included in the pk3 file)
NOTE: If your brightmaps have any alpha translucency, that section of the brightmap will be interpreted as "needs flat shading" (This also completely discards RGB info the brightmap set in that pixel!).
Use only black and white brightmaps if you need normal Zandronum/GZDoom behavior.
I recommend keeping the shader itself as a separate addon, for compatibility with future Zandronum versions. Since this overrides func_brightmap.fp, and GZDoom itself has already completely switched to using a different method for brightmaps (They are internally treated as materials, and old shaders replacing it won't work correctly) it's to be expected Zandronum will too, so please avoid making this an absolute requirement so people will be able to run your mod with newer Zandronum versions.
Spoiler: Features (Open)
-Gives your models in Zandronum a lot more contrast and a e s t h e t i c !
-Allows you to choose exactly which models/surfaces get affected by the lighting, and which ones don't!
-Does not sacrifice brightmap functionality!
Spoiler: Customization (Open)You can also customize light direction by modifying the following line in shaders/glsl/func_brightmap.fp:
Where X is left/right (left is negative, right is positive)
Y is up/down (negative up, positive down)
and Z is depth (positive closer, negative further).
Keep in mind that this doesn't work like a point light, but like a directional light.
Spoiler: Known bugs (Open)
-Zandronum will spit a shader compilation error with "pixelpos" and "xyz", these are false errors and can't be avoided, as far as I'm aware. The shader will still work fine.
-GPUs with Shader Model older than 4.0 may experience issues with light orientation (The lighting will appear to be "painted" into the model, and will rotate with it).
Screenshot of how it looks (might look nicer with higher poly models, or some with better triangle distribution):
stf_light_style.png
You do not have the required permissions to view the files attached to this post.
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.