- Posts: 180
Has someone made a flashlight shader? Here's one.
- luluco250
-
Topic Author
- Offline
Download: Right click and save as...
It supports adjusting the halo size, color, brightness and distance. You can also disable the small texturing effect I added, as well as the distance effect (for games with no depth buffer, or if you don't need it). The macros are pretty self-explanatory.
I didn't implement in-shader shortcut keys as I feel toggling the shader on/off with a bound key is a simpler and more easily customizable solution.
Please Log in or Create an account to join the conversation.
- WSH303
-
- Offline
- Posts: 18
Please Log in or Create an account to join the conversation.
- luluco250
-
Topic Author
- Offline
- Posts: 180
WSH303 wrote: Cool. Just an idea, you have an access to depth information and you know where is the source of light. Would it be possible to add some flashlight shadows, using that information?
I've thought about that, possibly, but you must understand that perfectly centered spotlights don't produce shadows that are very visible to someone behind the light, so the effect would be minimal. I guess I could depth-test and then cast some blurred shadows from it onto the flashlight texture itself, could look pretty interesting.
Please Log in or Create an account to join the conversation.
- luluco250
-
Topic Author
- Offline
- Posts: 180
Please Log in or Create an account to join the conversation.
- jas01
-
- Offline
- Posts: 157
Please Log in or Create an account to join the conversation.
- luluco250
-
Topic Author
- Offline
- Posts: 180
jas01 wrote: Isn't the new verion more washed out? I like the older verion a little more.
Either that or you literally can't see anything too dark at all.
The problem is that there's literally no light information in pixels very close or equal to zero, making it impossible to increase the brightness, so I basically "create" information, thus it can look washed out, but I limited it as close as I could to only pixels that need it.
If you'd like I can make an update to make it optional.
UPDATE:
Done, you can now revert back to the previous blending method by defining a FLASHLIGHT_NO_BLEND_FIX=1 macro.
#if !FLASHLIGHT_NO_BLEND_FIX
// Add some minimum amount of light to very dark pixels.
color = max(color, (result - 1.0) * 0.001);
#endif
Please Log in or Create an account to join the conversation.
- jas01
-
- Offline
- Posts: 157
Please Log in or Create an account to join the conversation.
- iMAG
-
- Offline
- Posts: 3
luluco250 wrote: I was missing a flashlight in Deus Ex Mankind Divided, so I ended up making a shader that replicates one.
Download: Right click and save as...
It supports adjusting the halo size, color, brightness and distance. You can also disable the small texturing effect I added, as well as the distance effect (for games with no depth buffer, or if you don't need it). The macros are pretty self-explanatory.
I didn't implement in-shader shortcut keys as I feel toggling the shader on/off with a bound key is a simpler and more easily customizable solution.
Hello there,
How do you bind a single shader to a key (not talking about the gloabl shade ON/OFF bind). I've been looking for hours but can't figure out how to do it. Do i need to edit the shader and add for exemple the file KeyCodes.fxh from <a class="bbcode_url" href="https://reshade.me/forum/shader-presentation/4150-simple-zoom-shader" target="_self">reshade.me/forum/shader-presentation/4150-simple-zoom-shader</a> ?
By the way thank you for your work. Great stuff.
-iMAG.
Please Log in or Create an account to join the conversation.
- Duran.te
-
- Offline
- Posts: 207
Please Log in or Create an account to join the conversation.
- Faustus86
-
- Offline
- Posts: 57
@crosire?
Please Log in or Create an account to join the conversation.
- marmamowl
-
- Offline
- Posts: 12

Please Log in or Create an account to join the conversation.
- Duran.te
-
- Offline
- Posts: 207
Indeed, maybe my reply was too brief.

Please Log in or Create an account to join the conversation.
- WSH303
-
- Offline
- Posts: 18

Please Log in or Create an account to join the conversation.
- Marot
-
- Offline
- Posts: 11
This look about right? ninjafada and I forked this shader and made some modifications back in April which do more or less what you're asking:WSH303 wrote: Add to this depth, possibility to select place on the screen considered as a light source and Marty's ray tracing for GI and shadows and we have a perfect flash light shader
github.com/Mortalitas/GShade-Shaders/blo...Shaders/Spotlight.fx
Please Log in or Create an account to join the conversation.