Skip to content

Cascade Shadow Mapping Volumes fix - #364

Merged
ampreeT merged 6 commits into
ampreeT:masterfrom
MyGamepedia:csm-volume-fix
Jun 23, 2026
Merged

ampreeT merged 6 commits into
ampreeT:masterfrom
MyGamepedia:csm-volume-fix

Conversation

@MyGamepedia

@MyGamepedia MyGamepedia commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #272
It adds hook for CBaseEntity::KeyValue to prevent CSMVolumeMode. It's done in this way because removing and recreating will not work, due to the very first spawned CSM sets Manual mode for all other CSM ents, this can't be fixed with edt as well.
It also adds hook on inputs to prevent console spam (and maybe inconsistent behavior). We SHOULD NOT remove csm volumes by auto delete in edt, because some of them contain inputs for map logic (not only csm volume set).

This also adds custom keyvalue support in Hammer for all entities (only bms for now).
It adds detour for CBaseEntity::KeyValue to prevent CSMVolumeMode. It's done in this way because removing and recreating will not work, due to the very spawned CSM  sets Manual mode for all other CSM ents, this can't be fixed with edt as well.
It also adds hook on inputs to prevent console spam (and maybe inconsistent behavior). We SHOULD NOT remove csm volumes by auto delete in edt, because some of them contain inputs for map logic (not only csm volume set).
@ampreeT

ampreeT commented Mar 27, 2026

Copy link
Copy Markdown
Owner

Which maps in the official campaign am I able to test this PR against?

@MyGamepedia

Copy link
Copy Markdown
Contributor Author

Which maps in the official campaign am I able to test this PR against?

i guess any ? i was doing tests on bm_c2a5a, make sure to set cl_csm_qualitymode 2.

@Alienmario Alienmario left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why aren't you using the virtual hook setup for CBaseEntity::KeyValue ? The detour would produce an unnecessarily large amount of calls I'm guessing.

@MyGamepedia

Copy link
Copy Markdown
Contributor Author

gonna do some tests, i'll rework in this way if it will work

@MyGamepedia
MyGamepedia requested a review from Alienmario April 20, 2026 06:46
@MyGamepedia

Copy link
Copy Markdown
Contributor Author

Why aren't you using the virtual hook setup for CBaseEntity::KeyValue ? The detour would produce an unnecessarily large amount of calls I'm guessing.

Done, you may also want to review snarks fix.

@Alienmario Alienmario left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Consider moving to Black Mesa's entitypatch include, even though the entity exists in CSGO, it looks like BM's impl is more customized.

Comment thread gamedata/srccoop.games.txt Resolved
@MyGamepedia
MyGamepedia requested a review from Alienmario April 20, 2026 14:47
@Alienmario

Copy link
Copy Markdown
Collaborator

@ampreeT okay to merge?

@ampreeT

ampreeT commented Jun 22, 2026

Copy link
Copy Markdown
Owner

@ampreeT okay to merge?

Code looks good to me. If this was tested, then yeah merge it in.

@MyGamepedia

Copy link
Copy Markdown
Contributor Author

Code looks good to me. If this was tested, then yeah merge it in.

Works pretty fine on Dr.Necro's servers.

@ampreeT
ampreeT merged commit b29beb6 into ampreeT:master Jun 23, 2026
2 checks passed
@MyGamepedia
MyGamepedia deleted the csm-volume-fix branch June 23, 2026 09:51
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.

CSM Volumes doesn't work

3 participants