Revert "refactor: use bevy_sk PbrMaterial instead of StandardMaterial"

This reverts commit 7b126557df.
This commit is contained in:
Schmarni
2025-07-08 00:37:29 +02:00
parent a4a43d3ceb
commit a8d3b1fda1
6 changed files with 24 additions and 25 deletions

View File

@@ -219,10 +219,10 @@ impl OxrHandInput {
let input = InputMethod::add_to(&node.0, hand, datamap)?;
let material = materials.add(BevyMaterial {
color: Srgba::new(1.0, 1.0, 1.0, 1.0).into(),
base_color: Srgba::new(1.0, 1.0, 1.0, 1.0).into(),
alpha_mode: AlphaMode::Blend,
diffuse_texture: Some(GRADIENT_TEXTURE_HANDLE),
roughness: 1.0,
base_color_texture: Some(GRADIENT_TEXTURE_HANDLE),
perceptual_roughness: 1.0,
..default()
});
Ok(OxrHandInput {
@@ -329,10 +329,10 @@ impl OxrHandInput {
*self.input.datamap.lock() = Datamap::from_typed(&self.datamap).unwrap();
let captured = self.capture_manager.capture.upgrade().is_some();
if captured && !self.captured {
materials.get_mut(&self.material).unwrap().color =
materials.get_mut(&self.material).unwrap().base_color =
Srgba::rgb(0., 1., 0.75).into();
} else if self.captured && !captured {
materials.get_mut(&self.material).unwrap().color =
materials.get_mut(&self.material).unwrap().base_color =
Srgba::rgb(1., 1.0, 1.0).into();
}
self.captured = captured;