Skip to content

Optimize shadow rendering: static object draw state caching and low-res far shadows option#1340

Open
adfriz wants to merge 1 commit into
leezer3:masterfrom
adfriz:optimize-shadow-static-and-lowres-cascade-options
Open

Optimize shadow rendering: static object draw state caching and low-res far shadows option#1340
adfriz wants to merge 1 commit into
leezer3:masterfrom
adfriz:optimize-shadow-static-and-lowres-cascade-options

Conversation

@adfriz

@adfriz adfriz commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This should improve shadow rendering and lower RAM usage.

  1. Caching:
    • Cache active object, material, and texture bindings in Shadows.cs
    • Skip redundant GL binds and uniform updates to reduce CPU/driver overhead.
  2. Low-res Far Shadows Option:
    • Add "Low-res Far Shadows" option to dynamically downscale far shadow map cascades (halving/quartering resolutions).
    • Saves rendering time and VRAM for distant shadow cascades.
    • Exposed via UI checkboxes in OpenBVE main settings, RouteViewer, and ObjectViewer.

not done yet, but i will set this PR as open.

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.

1 participant