Repository: godotengine/godot (language: cpp)

Issue:
`Material::render_priority` description is misleading
https://github.com/godotengine/godot/blob/cae3d722a3abd6d93d84a84beccc65a78948653f/doc/classes/Material.xml#L59

A material with priority 0 will render *before* (in time) a material with priority 1. (And -1 before 0.), at least on the Forward+ renderer.

I think the issue here is that "before" is being used to mean both "in front of" and "prior to", which have opposite meanings in the context of drawing.


Discussion / hints:

Fix patch:
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index 94d12018caa1..17df3f7531a4 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -56,7 +56,7 @@
 			[b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
 		</member>
 		<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority">
-			Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with [member render_priority] [code]1[/code] will render before all objects with [member render_priority] [code]0[/code].
+			Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with [member render_priority] [code]1[/code] will render on top of all objects with [member render_priority] [code]0[/code].
 			[b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
 			[b]Note:[/b] This will not impact how transparent objects are sorted relative to opaque objects or how dynamic meshes will be sorted relative to other opaque meshes. This is because all transparent objects are drawn after all opaque objects and all dynamic opaque meshes are drawn before other opaque meshes.
 		</member>


Test patch: