summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorMarius Hanl <mariushanl@web.de>2022-07-12 08:43:01 +0100
committerMarius Hanl <mariushanl@web.de>2023-01-31 20:04:11 +0100
commita59819630dcdb6dc9680b273d8a77267ea660e96 (patch)
tree27b8fc4d8711e98ee1038e3cd5a2ef659c01f1ca /scene/resources
parente93266b9ff359c98e9f8e2a550e16ad77490fc4d (diff)
Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
- Extents are replaced by Size (Size is Extents * 2) - The UI text displays 'Size' - Snapping is adjusted to work with Size - _set and _get handle extents for compatibility Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/fog_material.cpp2
-rw-r--r--scene/resources/visual_shader.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/fog_material.cpp b/scene/resources/fog_material.cpp
index 4e51bbaa73..aabaa54505 100644
--- a/scene/resources/fog_material.cpp
+++ b/scene/resources/fog_material.cpp
@@ -159,7 +159,7 @@ uniform sampler3D density_texture: hint_default_white;
void fog() {
DENSITY = density * clamp(exp2(-height_falloff * (WORLD_POSITION.y - OBJECT_POSITION.y)), 0.0, 1.0);
DENSITY *= texture(density_texture, UVW).r;
- DENSITY *= pow(clamp(-SDF / min(min(EXTENTS.x, EXTENTS.y), EXTENTS.z), 0.0, 1.0), edge_fade);
+ DENSITY *= pow(clamp(-2.0 * SDF / min(min(SIZE.x, SIZE.y), SIZE.z), 0.0, 1.0), edge_fade);
ALBEDO = albedo.rgb;
EMISSION = emission.rgb;
}
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index bfcf5cb137..421db6cc74 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -2936,7 +2936,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "world_position", "WORLD_POSITION" },
{ Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "object_position", "OBJECT_POSITION" },
{ Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "uvw", "UVW" },
- { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "extents", "EXTENTS" },
+ { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "size", "SIZE" },
{ Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_SCALAR, "sdf", "SDF" },
{ Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_SCALAR, "time", "TIME" },