Repository navigation
Lighting: shadow views, SSAO, baked light, and what HDR draws of a grade - #136
Merged
Merged
Conversation
…spot 1 graphics.shadow_views (0 to 384, default 0) counts the shadow budget in shadow views instead of lights: the lights that ask go nearest first, each taking its views while they fit, and a farther light that fits may still cast one. Above 0 it replaces shadow_lights; at 0 nothing changes, tool texts included. The lights query and ai/status say the budget in views, how many are taken, and what a light that missed out takes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
picture.ssao: Some((quality, radius, thickness)) in the camera content gives the world cameras Bevy's ScreenSpaceAmbientOcclusion, the depth and normal prepasses they lack and Msaa::Off (Bevy draws no SSAO under MSAA), put back when another module takes a prepass away. Taking it out gives the camera back its own SSAO, MSAA and prepasses. The view model's camera follows the world camera's MSAA and has no SSAO. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…run time Level nodes name their baked files (lightmap, lightmap_rect, irradiance_volume, reflection_probe, probe_falloff); the picture-only content kind baked_light names the folders of a level's sets and their exposure. A drawn level puts Bevy's Lightmap on the meshes (by their second UV map) and LightProbe with IrradianceVolume / EnvironmentMapLight on the probe boxes. select_baked_set switches a level's set (BakedLight, a resource of the picture); tools baked_light and baked_light_set. A content light with baked: true lights no lightmapped mesh's diffuse. Two Bevy 0.20 limits are worked around: a changed Lightmap on a mesh that has one is ignored (a switch takes the old one off for a frame once the new image is loaded), and a Lightmap that comes or goes does not pick the mesh's pipeline again (the mesh is marked changed with every one, or wgpu fails validation and Bevy stops drawing). Offscreen tests: a lightmapped mesh draws its lightmap, switches sets and still takes dynamic lights; and an ignored measurement of what SSAO costs on the GPU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The manual's picture, settings, lights and levels sections, the agents' notes, CHANGELOG and engine-progress. Confining a light to a room was researched and not done: Bevy's clustered lights carry no volume, so it needs a patched bevy_pbr; the manual says what that would take. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…meras Drawn for real in the sandbox: SSAO on the first-person camera with the view model's camera following its MSAA, a depth prepass taken away for a frame put back with the frames going on, and SSAO out again giving both cameras their MSAA back. Each picture is taken once the pipelines are compiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bevy grades a camera that does not draw in HDR in each material's shader, where only the exposure is applied (WHITE_BALANCE, SECTIONAL_COLOR_GRADING and HUE_ROTATE exist only in the tone mapping pass's pipeline). A bloom puts the camera in HDR and draws the rest of a grade for the first time, so a grade tuned without HDR (a game's temperature 0.2, contrast 1.2) turned its picture black and red. Nothing draws differently: the docs now say which fields need HDR, the real scale of temperature and tint (an offset to the CIE white point) and the contrast pivot, and the lights query adds a drawn: line. Grading::hdr_only, grade_drawn_in_full, and an offscreen test that pins Bevy's behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grading::hdr_only takes a field within 0.0005 of neutral as neutral, as the lights query prints it, so the end of a blend never says "leaves out" beside "shows: neutral". The tint's scale is stated as Bevy's formula gives it, not as a measured range. engine-progress counts the shards_light tests (9 and 19) and names the new ones; the agents' cookbook has the drawn: line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Lighting mechanisms for games whose levels look flat under a small shadow budget and no baked light (Cranium's Level 1 tunnels). Everything is opt-in and off by default: a game that asks for none of it draws exactly as before.
What it adds
graphics.shadow_views, 0 to 384, default 0). Counts the budget in shadow views instead of lights, so a point light costs 6 and a spot 1, and many spots can cast where one point would. At 0,shadow_lightsworks as before, tool texts included.picture.ssao: Some((quality, radius, thickness))). The world camera gets Bevy'sScreenSpaceAmbientOcclusion, the depth and normal prepasses, andMsaa::Off. Taking it out gives the camera back its own MSAA and prepasses. The view-model camera follows the world camera's MSAA and has no SSAO.lightmap,lightmap_rect,irradiance_volume,reflection_probe,probe_falloff), and the picture-only content kindbaked_lightnames a level's sets. A drawn level puts Bevy'sLightmapon its meshes (second UV map) andLightProbewithIrradianceVolume/EnvironmentMapLighton its probe boxes.select_baked_setswitches sets at run time, for example when a story beat turns lamps off. A content light withbaked: trueskips lightmapped meshes' diffuse. Two Bevy 0.20 limits are worked around: a changedLightmapis ignored, and adding or removing one doesn't re-pick the pipeline.bevy_pbr. The manual says what that would take.exposure; white balance, sectional grading and hue rotation exist only in the tone-mapping pass. Bloom puts a camera in HDR, so a grade tuned without HDR draws for the first time. In Cranium that turned the picture black and red. Rendering is unchanged here. What changed:lightsquery gains adrawn:line;Grading::hdr_onlyandgrade_drawn_in_fullare new;Tests
shards_lightandshards_motiontests, the sandbox scenarios, and the lights and first-person GPU tests pass locally. Clippy is clean.Not done
🤖 Generated with Claude Code