Draft
Conversation
…ogComponent) Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
…t fog Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add high misting solution implementation
Add height fog system (高度雾方案)
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements an exponential height fog effect as a full-screen post-process pass inserted between the forward pass and tone-mapping.
Fog Algorithm
Analytically integrates exponential density along the view ray:
Closed-form solution handles both horizontal and angled rays correctly. World position is reconstructed from depth buffer using
InvViewProj.New Components
HeightFogFeatureProcessor— manages fog params UBO, exportsHeightFogParamsBufferto render graph each frame; density defaults to 0 (no-op until component attached)HeightFogPass—FullScreenPassreadingFWD_CL+FWD_DS→HeightFogOutputHeightFogComponent— serializable world component exposing: fog color, inscatter color, density, height falloff, base/max height, start distance; resets density to 0 on detachPipeline Changes
DefaultForwardPipeline::Collectconditionally insertsHeightFogPasswhenHeightFogFeatureProcessoris present, redirectingPostProcessingPassinput via newSetColorInput()HeightFogFeature::Init()registered alongside other features inRenderModuleCross-API Depth Reconstruction
invViewProject(=viewProject.Inverse()) toSceneViewInfo/ViewInfoHLSL structHeightFogParams::clipYSigncorrects NDC Y-axis convention:+1for Vulkan (Y=-1 at top),-1for DX12/Metal (Y=+1 at top), set automatically fromRHI::GetDevice()->GetConstants().flipY🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.