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

Vulkan: Implement environment fog and exponential fog #36989

Closed
wants to merge 2 commits into from

Conversation

giarve
Copy link
Contributor

@giarve giarve commented Mar 11, 2020

Shader code was taken from GLES3 implementation and 3.2 branch.
The sun direction is now the direction of the first directional light (if there's any).

The commit Introduces a new parameter, exponential fog density, which allows a default for exponential fog while preserving fog's alpha color channel to specify fog density.
The commit also adds missing hide_prefixes[] for height and depth fog properties.

Exponential fog is enabled by default.

Fixes #36654.
Fixes #24596.

EDIT: Last push should fix CI build.

Shader code was taken from GLES3 implementation and 3.2 branch.
The sun direction is now the direction of the first directional light (if there's any).


Fixes godotengine#36654.
@clayjohn clayjohn added this to the 4.0 milestone Mar 11, 2020
@akien-mga akien-mga requested a review from reduz March 11, 2020 20:45
giarve added a commit to giarve/godot that referenced this pull request Mar 14, 2020
Introduces a new parameter, exponential fog density, which allows a default for exponential fog while preserving fog's alpha color channel to specify fog density.

The commit also adds missing hide_prefixes[] for height and depth fog properties.

Requires godotengine#36989.

Should fix godotengine#24596.
@giarve giarve requested a review from a team as a code owner March 14, 2020 18:40
doc/classes/Environment.xml Outdated Show resolved Hide resolved
doc/classes/Environment.xml Outdated Show resolved Hide resolved
@Calinou
Copy link
Member

Calinou commented Mar 14, 2020

Does exponential fog only apply to depth fog, or can it also apply to height fog? This should be mentioned in the class reference.

@giarve giarve force-pushed the vulkan-fog-implementation branch from 64b8ebe to 1a47c7b Compare March 15, 2020 13:08
@giarve giarve changed the title Vulkan: Implement environment fog Vulkan: Implement environment fog and exponential fog Mar 15, 2020
@giarve giarve force-pushed the vulkan-fog-implementation branch from d9265f0 to a1e27c4 Compare March 15, 2020 13:20
Introduces a new parameter, exponential fog density, which allows a default for exponential fog while preserving fog's alpha color channel to specify fog density.

The commit also adds missing hide_prefixes[] for height and depth fog properties.

Apply suggestions from code review
Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
@clayjohn
Copy link
Member

Thanks for doing the work to port the GLES3 fog to Vulkan. Unfortunately, Juan decided to implement a simpler form of distance based fog in #41240.

#41240 Supersedes this PR so closing :(

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

Successfully merging this pull request may close these issues.

Vulkan: Fog not reimplemented yet Add exponential fog
4 participants