Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use bevy_render::{
},
mesh::{Indices, Mesh, VertexAttributeValues},
pipeline::PrimitiveTopology,
prelude::{Color, Texture},
prelude::{Srgba, Texture},
render_graph::base,
texture::{AddressMode, FilterMode, ImageType, SamplerDescriptor, TextureError, TextureFormat},
};
Expand Down Expand Up @@ -348,15 +348,15 @@ fn load_material(material: &Material, load_context: &mut LoadContext) -> Handle<
load_context.set_labeled_asset(
&material_label,
LoadedAsset::new(StandardMaterial {
base_color: Color::rgba(color[0], color[1], color[2], color[3]),
base_color: Srgba::with_alpha(color[0], color[1], color[2], color[3]).into(),
base_color_texture,
roughness: pbr.roughness_factor(),
metallic: pbr.metallic_factor(),
metallic_roughness_texture,
normal_map,
double_sided: material.double_sided(),
occlusion_texture,
emissive: Color::rgba(emissive[0], emissive[1], emissive[2], 1.0),
emissive: Srgba::with_alpha(emissive[0], emissive[1], emissive[2], 1.0).into(),
emissive_texture,
unlit: material.unlit(),
..Default::default()
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct Light {
impl Default for Light {
fn default() -> Self {
Light {
color: Color::rgb(1.0, 1.0, 1.0),
color: Color::new(1.0, 1.0, 1.0),
depth: 0.1..50.0,
fov: f32::to_radians(60.0),
intensity: 200.0,
Expand Down Expand Up @@ -75,7 +75,7 @@ pub struct AmbientLight {
impl Default for AmbientLight {
fn default() -> Self {
Self {
color: Color::rgb(1.0, 1.0, 1.0),
color: Color::new(1.0, 1.0, 1.0),
brightness: 0.05,
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct StandardMaterial {
impl Default for StandardMaterial {
fn default() -> Self {
StandardMaterial {
base_color: Color::rgb(1.0, 1.0, 1.0),
base_color: Color::default(),
base_color_texture: None,
// This is the minimum the roughness is clamped to in shader code
// See https://google.github.io/filament/Filament.html#materialsystem/parameterization/
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ once_cell = "1.4.1"
downcast-rs = "1.2.0"
thiserror = "1.0"
anyhow = "1.0"
hex = "0.4.2"
base16 = "0.2.1"
hexasphere = "3.2"
parking_lot = "0.11.0"

Expand Down
Loading