Repository navigation
fix multi-window issues + add accessors to configure various rendering features (textures, shadows, anti-aliasing) - #413
Merged
Conversation
Merged
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.
New Features
OffscreenSurfacerenders with MSAA:OffscreenSurface::set_samples/samples, orCanvasSetup::samplesthroughwith_setup.OffscreenSurface::newstays single-sampled.Offscreen frames used to ignore the canvas sample count and always render one sample.
OffscreenSurface::set_shadow_softness/shadow_softnessandset_shadows_enabled/shadows_enabled, mirroring theWindowmethods.ShadowMapper::set_atlas_layers(Window/OffscreenSurface::set_shadow_atlas_layers)allocates fewer than the 16 shadow atlas layers, which makes a finer shadow resolution
affordable when a scene only lights with one or two directional lights.
TextureManager::set_anisotropy: anisotropic filtering (up to 16x) for textures loaded withmipmaps and linear filtering, which keeps floors and other grazing-angle textures sharp.
WindowandOffscreenSurfaceexpose the directional cascade layout that only theShadowMapperhad:set_shadow_distance/shadow_distanceandset_first_cascade_far_bound/first_cascade_far_bound.offscreen_msaaexample: an antialiased, hard-shadowed offscreen render.Bug Fixes
WindoworOffscreenSurfaceon a thread that already has one no longer replaces the global mesh, texture and material managers. Objects created before the new surface kept the previous default material, which the per-framebegin_frame/flushno longer reached, so its per-object uniform buffer grew until wgpu rejected the dynamic offsets (a validation error after 256 draws). The managers are now created once per context and reused until the last window closes.offscreen_shared_managersexample exercising a scene built before its offscreen surface, with shaded renders interleaved with depth and segmentation read-backs.