Skip to content

Mod Specific Visual Culling Size for Lasers#6729

Merged
wookieejedi merged 3 commits into
scp-fs2open:masterfrom
wookieejedi:mod-specific-laser-visual-cull
May 21, 2025
Merged

Mod Specific Visual Culling Size for Lasers#6729
wookieejedi merged 3 commits into
scp-fs2open:masterfrom
wookieejedi:mod-specific-laser-visual-cull

Conversation

@wookieejedi

Copy link
Copy Markdown
Member

Currently, lasers will not render if the length or both head and tail radii are < 0.0001. This is very small, and in many mods the smallest visual size is 0.01, so this PR exposes that culling size value to allow mods to optimize and tune visual culling of lasers, which can be quite useful especially in laser heavy missions.

Currently, lasers will not render if the length or both head and tail radii are < `0.0001`. This is very small, and in many mods the smallest visual size is `0.01`, so this PR exposes that culling size value to allow mods to optimize and tune visual culling of lasers, which can be quite useful especially in laser heavy missions.
@wookieejedi wookieejedi added the enhancement A new feature or upgrade of an existing feature to add additional functionality. label May 20, 2025

@Baezon Baezon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really culling as it is about filtering out bad data, curves notwithstanding, the only way this early out is triggered is if the table explicitly specifies the laser is below the threshold, in which case it will never render, and vice versa if it above the threshold.

What exactly do you mean by "in many mods the smallest visual size is 0.01"? Because this doesn't cull based on visual size, it culls based on absolute size.

@wookieejedi

wookieejedi commented May 20, 2025

Copy link
Copy Markdown
Member Author

Ah that's my bad yeah, it is indeed culling based on absolute size. By "in many mods the smallest visual size is 0.01" I just meant if a laser width or length is smaller than 0.01 then it is already not really visible.

Overall I should have given extra context, too. FotG is at least using curves quite heavily to decrease laser width and length, so we wanted to try and optimize this by exposing the absolute cull size to be something like 0.05 instead of 0.0001.

@Baezon Baezon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so curves were indeed the main point here, just wanted to be sure there wasn't some other misunderstanding. In which case, in the wiki documention you'll want to be clear that curves are the only reason a laser would sometimes be over, sometimes be under this threshold.

@wookieejedi

Copy link
Copy Markdown
Member Author

Thanks, that all sounds good and will do!

@wookieejedi

wookieejedi commented May 21, 2025

Copy link
Copy Markdown
Member Author

After discussion, changing to Do not render lasers below length since it is more descriptive.

@wookieejedi wookieejedi merged commit 381f9fd into scp-fs2open:master May 21, 2025
16 checks passed
@wookieejedi wookieejedi deleted the mod-specific-laser-visual-cull branch May 21, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature or upgrade of an existing feature to add additional functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants