Welcome, Guest.
Username: Password: Remember me

TOPIC: Has someone made a flashlight shader? Here's one.

Has someone made a flashlight shader? Here's one. 9 months 1 week ago #1

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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 9 months 1 week ago by luluco250.
The administrator has disabled public write access.
The following user(s) said Thank You: crosire, NattyDread, brussell, jas01, OtisInf, WalterDasTrevas, Fu-Bama, Viper_Joe, Arkane, thalixte and this user have 2 others thankyou

Has someone made a flashlight shader? Here's one. 9 months 1 week ago #2

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?
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 9 months 1 week ago #3

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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 9 months 1 week ago #4

I made a small update that improves how the flashlight texture blends into dark environments. It's already updated in my repo so the link should already point to the latest version.

Screenshots - Left is the old version, right is the new one.
Warning: Spoiler! [ Click to expand ]
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 9 months 1 week ago by luluco250.
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 9 months 1 week ago #5

Isn't the new verion more washed out? I like the older verion a little more.
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 9 months 5 days ago #6

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.

Warning: Spoiler! [ Click to expand ]
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 9 months 5 days ago by luluco250.
The administrator has disabled public write access.
The following user(s) said Thank You: jas01

Has someone made a flashlight shader? Here's one. 9 months 4 days ago #7

I understand now. Thank you for the update. Gonna try both modes and see what works best for me.
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 1 month 1 week ago #8

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 reshade.me/forum/shader-presentation/4150-simple-zoom-shader ?

By the way thank you for your work. Great stuff.
-iMAG.
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 1 month 1 week ago #9

Right click on the shader
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 1 month 1 week ago #10

Being able to bind Shaders to key's is actually i good idea. Even the standard Shaders have a lot of situational and playful shaders you don't need all the time. Likes ones you would only use for screenshots but nor for gaming, or things like Nightvision.

@crosire?
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 1 month 1 week ago #11

@iMAG @Faustus86 To elaborate on Duran.te's answer: With the ReShade GUI open, all you have to do is to right-click on the shader .fx of your choice. You'll see a Toggle Key field. Click on it, then tap on the button you wish to assign to toggle that shader. It works precisely the way you want it to. Multiple shaders can share the same Toggle Key, especially useful if you have a stack of shaders you only use for screenshotting etc. You can do inverse toggling too, with one shader activated and the other deactivated, giving them the same toggle key will make ReShade turn shader A off while turning shader B on, vice versa. It's a function that's been in ReShade for very long. :)
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 1 month 1 week ago #12

"To elaborate on Duran.te's answer"

Indeed, maybe my reply was too brief. :lol:
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 1 month 1 week ago #13

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 :P
The administrator has disabled public write access.

Has someone made a flashlight shader? Here's one. 3 weeks 2 days ago #14

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 :P
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:

github.com/Mortalitas/GShade-Shaders/blo...Shaders/Spotlight.fx
The administrator has disabled public write access.