Skip to content

Various developer improvements for shader compilation#35

Merged
doodlum merged 6 commits into
community-shaders:mainfrom
alandtse:main
Aug 7, 2023
Merged

Various developer improvements for shader compilation#35
doodlum merged 6 commits into
community-shaders:mainfrom
alandtse:main

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

Please note the change to menu open status. We definitely needed it in VR since our res is much smaller, but you may want to revert that or cherry pick the other changes.

alandtse and others added 6 commits July 29, 2023 00:17
Changes to a global define instead of per shader.
Add DeveloperMode and IsShaderEnabledAdded helper functions to identify
what shaders are enabled. Also clarifies developer mode is when log
level is trace or debug.
By default the features tab is the only meu that starts open. This
probably should turn into an INI option.
eyeOffset is no longer needed since we figured out the structure.

Fixes a reported shimmering in right eye.
@alandtse
Copy link
Copy Markdown
Collaborator Author

Note, I added a VR required fix to the end. Traveling so didn't have time to branch it off.

@TheRiverwoodModder
Copy link
Copy Markdown
Contributor

PR looks good, and it fixes the issue of the grass shader shimmering in the right eye.

@doodlum doodlum merged commit 84674fd into community-shaders:main Aug 7, 2023
alandtse referenced this pull request in alandtse/open-shaders Jul 20, 2025
Various developer improvements for shader compilation
SkrubbySkrubInAShrub pushed a commit that referenced this pull request May 24, 2026
input.WorldPosition in Effect.hlsl is camera-relative (the existing
fog and view-space transforms confirm this -- fog explicitly takes
CameraPosAdjust as a separate argument). GetShadowLightShadow's
ShadowProj is a world-space projection matrix, so passing camera-
relative coords yields shadow lookups offset by -CameraPosAdjust per
eye. Visible in VR (different offset per eye) and third-person.

Lighting.hlsl and RunGrass.hlsl already compute the world-space
position explicitly before calling GetShadowLightShadow; Effect.hlsl
now matches that pattern.

Caught by Copilot PR review on #35.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SkrubbySkrubInAShrub pushed a commit that referenced this pull request May 24, 2026
Two issues caught by CodeRabbit on PR #35:

- Deferred::CopyShadowLightData was gated on
  ShadowCasterManager::GetInstalledSlotCount() != 0, which is the
  point/spot kSHADOWMAPS slice count. The sun lives in a separate
  target (kSHADOWMAPS_ESRAM), so the guard was incorrectly skipping
  sun directional shadow upload (t98/t99) whenever the point-shadow
  pool was empty. Remove the guard.

- LightLimitFix::Settings was missing EnableLightsVisualisation and
  LightsVisualisationMode from the NLOHMANN serialization macro, so
  those debug-overlay toggles reset on every restart. Add them to
  the macro. The LLFDEBUG permutation toggle at startup is a deeper
  plumbing change deferred for a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

3 participants