You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Add optional depth fog
This commit is contained in:
@@ -899,6 +899,10 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
|
||||
if (!is_environment(p_render_data->environment) || !environment_get_fog_enabled(p_render_data->environment)) {
|
||||
spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_FOG;
|
||||
}
|
||||
|
||||
if (p_render_data->environment.is_valid() && environment_get_fog_mode(p_render_data->environment) == RS::EnvironmentFogMode::ENV_FOG_MODE_DEPTH) {
|
||||
spec_constant_base_flags |= 1 << SPEC_CONSTANT_USE_DEPTH_FOG;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -80,6 +80,7 @@ private:
|
||||
|
||||
SPEC_CONSTANT_DISABLE_DECALS = 13,
|
||||
SPEC_CONSTANT_DISABLE_FOG = 14,
|
||||
SPEC_CONSTANT_USE_DEPTH_FOG = 16,
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user