examples: apply real texture assets to multi-mesh examples
- meshes/cube: procedural checkerboard -> uv_texture.jpg (8x8 UV grid) - meshes/pbr: floor -> ground.jpeg, bump cube -> cave.jpg + caveNormal.jpg (normal map pre-encoded via sRGB OETF to cancel the GPU sRGB decode) - lights/shadow: ground -> ground.jpeg, cube -> uv_texture.jpg - effects/demo: ground -> ground.jpeg, cube -> uv_texture.jpg - effects/fog: ground -> ground.jpeg (tiled 80x80), cubes -> stonewall.jpg - effects/dof: ground -> ground.jpeg, cubes -> uv_texture.jpg - cameras/culling: shared cube mesh -> uv_texture.jpg - add lib/examples/assets/textures/ (19 assets, 6.5 MB) - document assets + usage in examples READMEs, docs/user/examples.md, docs/user/meshes/materials.md (CARGO_MANIFEST_DIR pattern, sRGB caveat)
This commit is contained in:
@@ -5,7 +5,7 @@ emissive materials.
|
||||
|
||||
| Example | Run command | What it shows |
|
||||
|---------|-------------|---------------|
|
||||
| `shadow` | `cargo run -p wsg-lib --example shadow` | Shadow mapping in isolation (directional light, 4 objects on a floor) |
|
||||
| `shadow` | `cargo run -p wsg-lib --example shadow` | Shadow mapping in isolation (directional light, 4 objects on a textured floor) |
|
||||
| `shadow_test` | `cargo run -p wsg-lib --example shadow_test` | Dedicated shadow test: one directional caster, cube on a ground slab, PCF-softened |
|
||||
| `spot_test` | `cargo run -p wsg-lib --example spot_test` | Isolated spot light: directed beam, penumbra, attenuation |
|
||||
| `emissive` | `cargo run -p wsg-lib --example emissive` | Emissive materials (increasing intensities 0 → 4.0) |
|
||||
@@ -18,7 +18,9 @@ emissive materials.
|
||||
|
||||
Four objects (cube, sphere, cone, cylinder) on a floor, lit by a directional
|
||||
light that casts shadows. Shadow quality is controlled by `ShadowConfig`
|
||||
(map size, anti-acne bias).
|
||||
(map size, anti-acne bias). The floor is textured (`ground.jpeg`, tiled) and
|
||||
the rotating cube uses the `uv_texture.jpg` UV atlas — the textures make the
|
||||
shadow shapes and their movement clearly readable.
|
||||
|
||||
```sh
|
||||
cargo run -p wsg-lib --example shadow
|
||||
|
||||
Reference in New Issue
Block a user