Various developer improvements for shader compilation#35
Merged
Conversation
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.
Collaborator
Author
|
Note, I added a VR required fix to the end. Traveling so didn't have time to branch it off. |
Contributor
|
PR looks good, and it fixes the issue of the grass shader shimmering in the right eye. |
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>
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.
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.