Conditional Toggle for Lens Flare.

2 years 3 months ago - 2 years 3 months ago #1 by manakaiser
Conditional Toggle for Lens Flare. was created by manakaiser

Would it be possible to add a condition to a shader so it is automatically completely "disabled" (as in it doesnt apply the effect) if certain areas of the screen are below a certain brightness threshold (or alternatively have a certain hue/color) or anything akin to that that ISNT based on the games resolution but rather location relative to screen center/edge? (I could make it work with something as simple as bottom leftmost pixel is XXX, doesnt have to be a large area)

Specifically I would love to make a certain lens flare shader not display the flare when indoors and in the game im using it or ALL indoor rooms have a black outline and NO outdoors area has one which seems to be a very straightorward and clear distinction (screenshots for clarification below, note that on the indoors screen the areas outside of the room walls are black without the flare enabled so for example the bottom leftmost pixel woudl always be black indoors, but even within the bounds of the walls it kinda looks off which is why i would like to completely disable inside of buildings/rooms, if possible even with an adaptation time so it doesnt feel too abrupt)

All outdoors areas
All Indoors Areas

I love how the Flare works outside but it just doesnt fit indoors for likely evident reasons But toggling it manually everytime I enter a room Just kills the experience.

This is the Shader im using:

Warning: Spoiler!

Any help would be fantastic should this be at all possible, but no worries if not!
Last edit: 2 years 3 months ago by manakaiser.

Please Log in or Create an account to join the conversation.