Implement HDRI skybox support
This commit is contained in:
parent
44489f9fe3
commit
1e9b997aeb
12 changed files with 282 additions and 17 deletions
|
|
@ -55,14 +55,8 @@ impl RenderingSystem for BasicMeshRenderingSystem {
|
|||
}
|
||||
};
|
||||
|
||||
// Direction from the light source (0,+Y) towards the scene.
|
||||
let light_dir: Vec3 = Vec3::new(0.0, -1.0, 0.0).normalize();
|
||||
|
||||
// let asset_manager = ctx.asset_manager.borrow();
|
||||
// let any_ref: &dyn Any = &**asset_manager;
|
||||
// if let Some(glium_manager) = any_ref.downcast_ref::<GliumAssetManager>() {
|
||||
// &glium_manager.models;
|
||||
// }
|
||||
// Use HDR-derived environment light direction if provided, otherwise default to downward
|
||||
let light_dir: Vec3 = if ctx.env_light_dir.length_squared() > 0.0 { ctx.env_light_dir.normalize() } else { Vec3::new(0.0, -1.0, 0.0) };
|
||||
|
||||
let asset_manager = ctx.asset_manager.borrow();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue