Skip to content

Allow fog compute from points other than Viewpoint position#1400

Open
dileepvr wants to merge 2 commits into
UZDoom:trunkfrom
dileepvr:fogcenter_diff_viewpos
Open

Allow fog compute from points other than Viewpoint position#1400
dileepvr wants to merge 2 commits into
UZDoom:trunkfrom
dileepvr:fogcenter_diff_viewpos

Conversation

@dileepvr

Copy link
Copy Markdown
Contributor

Added ability to compute fog from a point different from Viewpoint position. Useful for third-person cameras, cinematic cameras with far-away subject emphasis, etc.

Orthographic example with thickfog enabled:
viewpos_thickfog.zip

fogcenter2.mp4

We need to decide on whether or not to add a flag to the camera actor to activate this.

In the first commit, camera actor's ViewPos field has to be non-null to activate. Sets Viewpoint.FogCenterPos to camera->tracer if not null, else tries to undo ViewPos offset and sets Viewpoint.FogCenterPos that way (unless VPSF_ABSOLUTEPOS flag is set).

Works with all manner of portals and even in camera textures.

Checklist

…sition. In this commit, camera actor's ViewPos field has to be non-null to activate. Sets FogCenterPos to camera->tracer if not null, else tries to undo ViewPos offset and sets FogCenterPos that way (unless VPSF_ABSOLUTEPOS flag is set).
@github-actions

Copy link
Copy Markdown

Thanks for opening this PR! We'll review it soon.

I'm a bot that checks for some common problems. I'll update this comment with anything I find.

Nothing to report. Nice :)

@RicardoLuis0 RicardoLuis0 added this to the 5.x milestone May 24, 2026
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

Successfully merging this pull request may close these issues.

2 participants