Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would like to implement no-fog zones #23

Open
AlexandreFiset opened this issue Sep 22, 2017 · 2 comments
Open

Would like to implement no-fog zones #23

AlexandreFiset opened this issue Sep 22, 2017 · 2 comments

Comments

@AlexandreFiset
Copy link

Hi,

Is there a way to add no fog zones in the shader code?

We currently are running some tests, using the height fog as some kind of mist in our scene, and we want one of the character skills to remove some of the mist. The problem is that the skill is done away from the player, and he can move close or away from that zone.

We know it is possible with Ray Marching to add primitive(s) to the calculation and wondered if you would know where in the code we should be looking in order to achieve what we want?

We don't know if that will look realistic but we want to try it ;p

Cheers!

@SlightlyMad
Copy link
Owner

Hi,
sorry for the very late reply. I've been very busy lately. In case this is still relevant, look for GetDensity function in VolumetricLight.shader. It is called for every raymarching sample. wpos is world space position. Simply make an intersection test with your primitive and set "density" to zero to kill the effect. Or gradually fade out the effect with decreasing density.

@setebe
Copy link

setebe commented May 21, 2019

Just add invisible object to "no-fog" zone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants