diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index c803f43fb0b..365efa67615 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -9,7 +9,7 @@
-
+
@@ -22,7 +22,7 @@
Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero.
-
+
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 9a398b1f33d..1b58b50bc77 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1391,21 +1391,21 @@
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
-
+
-
+
-
+
@@ -1460,7 +1460,7 @@
Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override].
-
+
@@ -2741,7 +2741,7 @@
-
+
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 10deaf1c415..1921c5b91d9 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -26,7 +26,7 @@
Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES].
-
+
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 672b660c348..1208b93a628 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -10,7 +10,7 @@
$DOCS_URL/tutorials/shaders/index.html
-
+
@@ -31,7 +31,7 @@
Returns the default value of the material property with given [code]name[/code].
-
+
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 9440a3a0ae0..26441fc7267 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -2522,11 +2522,11 @@ String MaterialStorage::shader_get_code(RID p_shader) const {
return shader->code;
}
-void MaterialStorage::shader_get_param_list(RID p_shader, List *p_param_list) const {
+void MaterialStorage::shader_get_shader_uniform_list(RID p_shader, List *p_param_list) const {
GLES3::Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND(!shader);
if (shader->data) {
- return shader->data->get_param_list(p_param_list);
+ return shader->data->get_shader_uniform_list(p_param_list);
}
}
@@ -2758,14 +2758,14 @@ bool MaterialStorage::material_casts_shadows(RID p_material) {
return true; //by default everything casts shadows
}
-void MaterialStorage::material_get_instance_shader_parameters(RID p_material, List *r_parameters) {
+void MaterialStorage::material_get_instance_shader_uniforms(RID p_material, List *r_parameters) {
GLES3::Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
if (material->shader && material->shader->data) {
material->shader->data->get_instance_param_list(r_parameters);
if (material->next_pass.is_valid()) {
- material_get_instance_shader_parameters(material->next_pass, r_parameters);
+ material_get_instance_shader_uniforms(material->next_pass, r_parameters);
}
}
}
@@ -2873,7 +2873,7 @@ void CanvasShaderData::set_default_texture_param(const StringName &p_name, RID p
}
}
-void CanvasShaderData::get_param_list(List *p_param_list) const {
+void CanvasShaderData::get_shader_uniform_list(List *p_param_list) const {
HashMap order;
for (const KeyValue &E : uniforms) {
@@ -3110,7 +3110,7 @@ void SkyShaderData::set_default_texture_param(const StringName &p_name, RID p_te
}
}
-void SkyShaderData::get_param_list(List *p_param_list) const {
+void SkyShaderData::get_shader_uniform_list(List *p_param_list) const {
RBMap order;
for (const KeyValue &E : uniforms) {
@@ -3435,7 +3435,7 @@ void SceneShaderData::set_default_texture_param(const StringName &p_name, RID p_
}
}
-void SceneShaderData::get_param_list(List *p_param_list) const {
+void SceneShaderData::get_shader_uniform_list(List *p_param_list) const {
RBMap order;
for (const KeyValue &E : uniforms) {
diff --git a/drivers/gles3/storage/material_storage.h b/drivers/gles3/storage/material_storage.h
index 8fc15ddcba4..2ca47351a49 100644
--- a/drivers/gles3/storage/material_storage.h
+++ b/drivers/gles3/storage/material_storage.h
@@ -54,7 +54,7 @@ namespace GLES3 {
struct ShaderData {
virtual void set_code(const String &p_Code) = 0;
virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index) = 0;
- virtual void get_param_list(List *p_param_list) const = 0;
+ virtual void get_shader_uniform_list(List *p_param_list) const = 0;
virtual void get_instance_param_list(List *p_param_list) const = 0;
virtual bool is_param_texture(const StringName &p_param) const = 0;
@@ -164,7 +164,7 @@ struct CanvasShaderData : public ShaderData {
virtual void set_code(const String &p_Code);
virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index);
- virtual void get_param_list(List *p_param_list) const;
+ virtual void get_shader_uniform_list(List *p_param_list) const;
virtual void get_instance_param_list(List *p_param_list) const;
virtual bool is_param_texture(const StringName &p_param) const;
@@ -215,7 +215,7 @@ struct SkyShaderData : public ShaderData {
virtual void set_code(const String &p_Code);
virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index);
- virtual void get_param_list(List *p_param_list) const;
+ virtual void get_shader_uniform_list(List *p_param_list) const;
virtual void get_instance_param_list(List *p_param_list) const;
virtual bool is_param_texture(const StringName &p_param) const;
virtual bool is_animated() const;
@@ -335,7 +335,7 @@ struct SceneShaderData : public ShaderData {
virtual void set_code(const String &p_Code);
virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index);
- virtual void get_param_list(List *p_param_list) const;
+ virtual void get_shader_uniform_list(List *p_param_list) const;
virtual void get_instance_param_list(List *p_param_list) const;
virtual bool is_param_texture(const StringName &p_param) const;
@@ -545,7 +545,7 @@ public:
virtual void shader_set_code(RID p_shader, const String &p_code) override;
virtual void shader_set_path_hint(RID p_shader, const String &p_path) override;
virtual String shader_get_code(RID p_shader) const override;
- virtual void shader_get_param_list(RID p_shader, List *p_param_list) const override;
+ virtual void shader_get_shader_uniform_list(RID p_shader, List *p_param_list) const override;
virtual void shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture, int p_index) override;
virtual RID shader_get_default_texture_param(RID p_shader, const StringName &p_name, int p_index) const override;
@@ -576,7 +576,7 @@ public:
virtual bool material_is_animated(RID p_material) override;
virtual bool material_casts_shadows(RID p_material) override;
- virtual void material_get_instance_shader_parameters(RID p_material, List *r_parameters) override;
+ virtual void material_get_instance_shader_uniforms(RID p_material, List *r_parameters) override;
virtual void material_update_dependency(RID p_material, DependencyTracker *p_instance) override;
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 57203ec1475..ebd7525bb8f 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1426,19 +1426,19 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
// Render every past/future step with the capture shader.
RS::get_singleton()->canvas_item_set_material(onion.capture.canvas_item, onion.capture.material->get_rid());
- onion.capture.material->set_shader_param("bkg_color", GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
- onion.capture.material->set_shader_param("differences_only", onion.differences_only);
- onion.capture.material->set_shader_param("present", onion.differences_only ? RS::get_singleton()->viewport_get_texture(present_rid) : RID());
+ onion.capture.material->set_shader_uniform("bkg_color", GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
+ onion.capture.material->set_shader_uniform("differences_only", onion.differences_only);
+ onion.capture.material->set_shader_uniform("present", onion.differences_only ? RS::get_singleton()->viewport_get_texture(present_rid) : RID());
int step_off_a = onion.past ? -onion.steps : 0;
int step_off_b = onion.future ? onion.steps : 0;
int cidx = 0;
- onion.capture.material->set_shader_param("dir_color", onion.force_white_modulate ? Color(1, 1, 1) : Color(EDITOR_GET("editors/animation/onion_layers_past_color")));
+ onion.capture.material->set_shader_uniform("dir_color", onion.force_white_modulate ? Color(1, 1, 1) : Color(EDITOR_GET("editors/animation/onion_layers_past_color")));
for (int step_off = step_off_a; step_off <= step_off_b; step_off++) {
if (step_off == 0) {
// Skip present step and switch to the color of future.
if (!onion.force_white_modulate) {
- onion.capture.material->set_shader_param("dir_color", EDITOR_GET("editors/animation/onion_layers_future_color"));
+ onion.capture.material->set_shader_uniform("dir_color", EDITOR_GET("editors/animation/onion_layers_future_color"));
}
continue;
}
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 00fc8cc7d68..1b4d98fc3fe 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -340,17 +340,17 @@ Ref StandardMaterial3DConversionPlugin::convert(const Ref &p
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
// Texture parameter has to be treated specially since StandardMaterial3D saved it
// as RID but ShaderMaterial needs Texture itself
Ref texture = mat->get_texture_by_name(E.name);
if (texture.is_valid()) {
- smat->set_shader_param(E.name, texture);
+ smat->set_shader_uniform(E.name, texture);
} else {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
}
@@ -386,17 +386,17 @@ Ref ORMMaterial3DConversionPlugin::convert(const Ref &p_reso
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
// Texture parameter has to be treated specially since ORMMaterial3D saved it
// as RID but ShaderMaterial needs Texture itself
Ref texture = mat->get_texture_by_name(E.name);
if (texture.is_valid()) {
- smat->set_shader_param(E.name, texture);
+ smat->set_shader_uniform(E.name, texture);
} else {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
}
@@ -432,11 +432,11 @@ Ref ParticlesMaterialConversionPlugin::convert(const Ref &p_
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
smat->set_render_priority(mat->get_render_priority());
@@ -471,11 +471,11 @@ Ref CanvasItemMaterialConversionPlugin::convert(const Ref &p
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
smat->set_render_priority(mat->get_render_priority());
@@ -510,11 +510,11 @@ Ref ProceduralSkyMaterialConversionPlugin::convert(const Ref
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
smat->set_render_priority(mat->get_render_priority());
@@ -549,11 +549,11 @@ Ref PanoramaSkyMaterialConversionPlugin::convert(const Ref &
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
smat->set_render_priority(mat->get_render_priority());
@@ -588,11 +588,11 @@ Ref PhysicalSkyMaterialConversionPlugin::convert(const Ref &
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
smat->set_render_priority(mat->get_render_priority());
@@ -627,11 +627,11 @@ Ref FogMaterialConversionPlugin::convert(const Ref &p_resour
smat->set_shader(shader);
List params;
- RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms);
+ RS::get_singleton()->shader_get_shader_uniform_list(mat->get_shader_rid(), ¶ms);
for (const PropertyInfo &E : params) {
Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name);
- smat->set_shader_param(E.name, value);
+ smat->set_shader_uniform(E.name, value);
}
smat->set_render_priority(mat->get_render_priority());
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index ba505a9abb0..005d5fc9514 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6408,7 +6408,7 @@ void fragment() {
Ref rotate_mat = memnew(ShaderMaterial);
rotate_mat->set_render_priority(Material::RENDER_PRIORITY_MAX);
rotate_mat->set_shader(rotate_shader);
- rotate_mat->set_shader_param("albedo", col);
+ rotate_mat->set_shader_uniform("albedo", col);
rotate_gizmo_color[i] = rotate_mat;
Array arrays = surftool->commit_to_arrays();
@@ -6416,7 +6416,7 @@ void fragment() {
rotate_gizmo[i]->surface_set_material(0, rotate_mat);
Ref rotate_mat_hl = rotate_mat->duplicate();
- rotate_mat_hl->set_shader_param("albedo", albedo);
+ rotate_mat_hl->set_shader_uniform("albedo", albedo);
rotate_gizmo_color_hl[i] = rotate_mat_hl;
if (i == 2) { // Rotation white outline
@@ -6457,7 +6457,7 @@ void fragment() {
)");
border_mat->set_shader(border_shader);
- border_mat->set_shader_param("albedo", Color(0.75, 0.75, 0.75, col.a / 3.0));
+ border_mat->set_shader_uniform("albedo", Color(0.75, 0.75, 0.75, col.a / 3.0));
rotate_gizmo[3] = Ref(memnew(ArrayMesh));
rotate_gizmo[3]->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, arrays);
@@ -6710,8 +6710,8 @@ void Node3DEditor::_init_grid() {
fade_size = CLAMP(fade_size, min_fade_size, max_fade_size);
real_t grid_fade_size = (grid_size - primary_grid_steps) * fade_size;
- grid_mat[c]->set_shader_param("grid_size", grid_fade_size);
- grid_mat[c]->set_shader_param("orthogonal", orthogonal);
+ grid_mat[c]->set_shader_uniform("grid_size", grid_fade_size);
+ grid_mat[c]->set_shader_uniform("orthogonal", orthogonal);
// Cache these so we don't have to re-access memory.
Vector &ref_grid = grid_points[c];
@@ -7559,9 +7559,9 @@ void Node3DEditor::_sun_direction_draw() {
sun_direction->draw_rect(Rect2(Vector2(), sun_direction->get_size()), Color(1, 1, 1, 1));
Vector3 z_axis = preview_sun->get_transform().basis.get_column(Vector3::AXIS_Z);
z_axis = get_editor_viewport(0)->camera->get_camera_transform().basis.xform_inv(z_axis);
- sun_direction_material->set_shader_param("sun_direction", Vector3(z_axis.x, -z_axis.y, z_axis.z));
+ sun_direction_material->set_shader_uniform("sun_direction", Vector3(z_axis.x, -z_axis.y, z_axis.z));
Color color = sun_color->get_pick_color() * sun_energy->get_value();
- sun_direction_material->set_shader_param("sun_color", Vector3(color.r, color.g, color.b));
+ sun_direction_material->set_shader_uniform("sun_color", Vector3(color.r, color.g, color.b));
}
void Node3DEditor::_preview_settings_changed() {
@@ -8162,8 +8162,8 @@ void fragment() {
)");
sun_direction_material.instantiate();
sun_direction_material->set_shader(sun_direction_shader);
- sun_direction_material->set_shader_param("sun_direction", Vector3(0, 0, 1));
- sun_direction_material->set_shader_param("sun_color", Vector3(1, 1, 1));
+ sun_direction_material->set_shader_uniform("sun_direction", Vector3(0, 0, 1));
+ sun_direction_material->set_shader_uniform("sun_color", Vector3(1, 1, 1));
sun_direction->set_material(sun_direction_material);
HBoxContainer *sun_angle_hbox = memnew(HBoxContainer);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index ed0d14efb7f..c453ed26aad 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -921,8 +921,8 @@ void fragment() {
)");
handle_material->set_shader(handle_shader);
Ref handle = EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("EditorBoneHandle"), SNAME("EditorIcons"));
- handle_material->set_shader_param("point_size", handle->get_width());
- handle_material->set_shader_param("texture_albedo", handle);
+ handle_material->set_shader_uniform("point_size", handle->get_width());
+ handle_material->set_shader_uniform("texture_albedo", handle);
handles_mesh_instance = memnew(MeshInstance3D);
handles_mesh_instance->set_cast_shadows_setting(GeometryInstance3D::SHADOW_CASTING_SETTING_OFF);
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 0fc7079a246..64cafa17f3b 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -57,8 +57,8 @@ void Texture3DEditor::_texture_changed() {
}
void Texture3DEditor::_update_material() {
- material->set_shader_param("layer", (layer->get_value() + 0.5) / texture->get_depth());
- material->set_shader_param("tex", texture->get_rid());
+ material->set_shader_uniform("layer", (layer->get_value() + 0.5) / texture->get_depth());
+ material->set_shader_uniform("tex", texture->get_rid());
String format = Image::get_format_name(texture->get_format());
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index cb146fd3424..2c6f70463dc 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -68,9 +68,9 @@ void TextureLayeredEditor::_texture_changed() {
}
void TextureLayeredEditor::_update_material() {
- materials[0]->set_shader_param("layer", layer->get_value());
- materials[2]->set_shader_param("layer", layer->get_value());
- materials[texture->get_layered_type()]->set_shader_param("tex", texture->get_rid());
+ materials[0]->set_shader_uniform("layer", layer->get_value());
+ materials[2]->set_shader_uniform("layer", layer->get_value());
+ materials[texture->get_layered_type()]->set_shader_uniform("tex", texture->get_rid());
Vector3 v(1, 1, 1);
v.normalize();
@@ -79,10 +79,10 @@ void TextureLayeredEditor::_update_material() {
b.rotate(Vector3(1, 0, 0), x_rot);
b.rotate(Vector3(0, 1, 0), y_rot);
- materials[1]->set_shader_param("normal", v);
- materials[1]->set_shader_param("rot", b);
- materials[2]->set_shader_param("normal", v);
- materials[2]->set_shader_param("rot", b);
+ materials[1]->set_shader_uniform("normal", v);
+ materials[1]->set_shader_uniform("rot", b);
+ materials[2]->set_shader_uniform("normal", v);
+ materials[2]->set_shader_uniform("rot", b);
String format = Image::get_format_name(texture->get_format());
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index ad82f2e9b2e..1c0e879a0aa 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -6228,7 +6228,7 @@ void VisualShaderNodePortPreview::_shader_changed() {
}
if (src_mat && src_mat->get_shader().is_valid()) {
List params;
- src_mat->get_shader()->get_param_list(¶ms);
+ src_mat->get_shader()->get_shader_uniform_list(¶ms);
for (const PropertyInfo &E : params) {
material->set(E.name, src_mat->get(E.name));
}
diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp
index a1789412f40..7bce6f2c219 100644
--- a/modules/mono/editor/code_completion.cpp
+++ b/modules/mono/editor/code_completion.cpp
@@ -172,7 +172,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
}
} break;
case CompletionKind::SHADER_PARAMS: {
- print_verbose("Shared params completion for C# not implemented.");
+ print_verbose("Shader uniforms completion for C# is not implemented yet.");
} break;
case CompletionKind::SIGNALS: {
Ref