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

Edit:: Fixed - Water invisible in the darkness #43

Open
Aricsprague opened this issue Nov 13, 2021 · 1 comment
Open

Edit:: Fixed - Water invisible in the darkness #43

Aricsprague opened this issue Nov 13, 2021 · 1 comment

Comments

@Aricsprague
Copy link

I've made several changes in the code to this Shader to make it just slightly more to my liking. One thing I haven't figured out is how to edit the water to where it's not invisible in the dark. I tried changing the opacity to 1 which did work but that's ugly water. If I had to guess the fix would have something to do with checking the water surface for light hitting it, if there's low light change the alpha or opacity to the point where it's not literally invisible. Or possibly if the light level is lower than a certain level turning up reflections a bunch so that you can know it's there. When I'm caving I constantly run into water I had no idea was there. And I can't see it until I throw 1,000 torches all over the place

@Aricsprague Aricsprague changed the title Water invisible in the darkness Edit:: Fixed - Water invisible in the darkness Dec 5, 2021
@Aricsprague
Copy link
Author

Aricsprague commented Dec 5, 2021

I found the solution.

Near the end of Set.txt there's this line of code:
#define F0_WATER vec3(0.040) //vec3(0.020)

I changed it to this:
#define F0_WATER vec3(0.200)

this is the result (keep in mind I have ENV light set to 0.033):
Screenshot_20211204-225536_Minecraft

So now the water is visible in low light areas whilst still retaining its translucence

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

No branches or pull requests

2 participants