summaryrefslogtreecommitdiff
path: root/scene/3d/gi_probe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r--scene/3d/gi_probe.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index cb1292a9d1..6cdd42ed65 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -919,7 +919,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 +931,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 +942,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 +1365,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);