Set sufrace override material albedo instead
This commit is contained in:
parent
36f53e14f0
commit
5d9630b03a
@ -3,19 +3,21 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://be6kkun8jvorr"
|
uid="uid://be6kkun8jvorr"
|
||||||
path="res://.godot/imported/{str_grating1.png-c56d7008acfd43735ff24601098a1911.ctex"
|
path.s3tc="res://.godot/imported/{str_grating1.png-c56d7008acfd43735ff24601098a1911.s3tc.ctex"
|
||||||
|
path.etc2="res://.godot/imported/{str_grating1.png-c56d7008acfd43735ff24601098a1911.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://maps/textures/{str_grating1.png"
|
source_file="res://maps/textures/{str_grating1.png"
|
||||||
dest_files=["res://.godot/imported/{str_grating1.png-c56d7008acfd43735ff24601098a1911.ctex"]
|
dest_files=["res://.godot/imported/{str_grating1.png-c56d7008acfd43735ff24601098a1911.s3tc.ctex", "res://.godot/imported/{str_grating1.png-c56d7008acfd43735ff24601098a1911.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
compress/uastc_level=0
|
||||||
@ -23,7 +25,7 @@ compress/rdo_quality_loss=0.0
|
|||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
@ -37,4 +39,4 @@ process/normal_map_invert_y=false
|
|||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|||||||
@ -25,7 +25,7 @@ pub struct WeaponMesh {
|
|||||||
impl WeaponMesh {
|
impl WeaponMesh {
|
||||||
fn set_color(&mut self, color: Color) {
|
fn set_color(&mut self, color: Color) {
|
||||||
if let Some(mesh) = &mut self.mesh
|
if let Some(mesh) = &mut self.mesh
|
||||||
&& let Some(mut mat) = mesh.get_active_material(0)
|
&& let Some(mut mat) = mesh.get_surface_override_material(0)
|
||||||
{
|
{
|
||||||
mat.set("albedo_color", &color.to_variant());
|
mat.set("albedo_color", &color.to_variant());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user