diff options
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r-- | scene/3d/gi_probe.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index cb1292a9d1..7370e1330c 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -919,7 +920,7 @@ Vector<Color> GIProbe::_get_bake_texture(Image &p_image, const Color &p_color) { GIProbe::Baker::MaterialCache GIProbe::_get_material_cache(Ref<Material> p_material, Baker *p_baker) { //this way of obtaining materials is inaccurate and also does not support some compressed formats very well - Ref<FixedSpatialMaterial> mat = p_material; + Ref<SpatialMaterial> mat = p_material; Ref<Material> material = mat; //hack for now @@ -931,7 +932,7 @@ GIProbe::Baker::MaterialCache GIProbe::_get_material_cache(Ref<Material> p_mater if (mat.is_valid()) { - Ref<Texture> albedo_tex = mat->get_texture(FixedSpatialMaterial::TEXTURE_ALBEDO); + Ref<Texture> albedo_tex = mat->get_texture(SpatialMaterial::TEXTURE_ALBEDO); Image img_albedo; if (albedo_tex.is_valid()) { @@ -942,7 +943,7 @@ GIProbe::Baker::MaterialCache GIProbe::_get_material_cache(Ref<Material> p_mater mc.albedo = _get_bake_texture(img_albedo, mat->get_albedo()); - Ref<ImageTexture> emission_tex = mat->get_texture(FixedSpatialMaterial::TEXTURE_EMISSION); + Ref<ImageTexture> emission_tex = mat->get_texture(SpatialMaterial::TEXTURE_EMISSION); Color emission_col = mat->get_emission(); emission_col.r *= mat->get_emission_energy(); @@ -1365,11 +1366,11 @@ void GIProbe::_create_debug_mesh(Baker *p_baker) { } { - Ref<FixedSpatialMaterial> fsm; + Ref<SpatialMaterial> fsm; fsm.instance(); - fsm->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true); - fsm->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); - fsm->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true); + fsm->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true); + fsm->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); + fsm->set_flag(SpatialMaterial::FLAG_UNSHADED, true); fsm->set_albedo(Color(1, 1, 1, 1)); mesh->surface_set_material(0, fsm); |