Skip to content

Commit 1a2129b

Browse files
committed
Document GPUParticles3D precision limitation in Large world coordinates
This affects particles that use global coordinates (i.e. Local Coords disabled) only.
1 parent 685d2ee commit 1a2129b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tutorials/physics/large_world_coordinates.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,29 +224,32 @@ Limitations
224224
Since 3D rendering shaders don't actually use double-precision floats, there are
225225
some limitations when it comes to 3D rendering precision:
226226

227-
- Shaders using the ``skip_vertex_transform`` or ``world_vertex_coords`` don't
228-
benefit from increased precision.
229227
- :ref:`Triplanar mapping <doc_standard_material_3d_triplanar_mapping>` doesn't
230228
benefit from increased precision. Materials using triplanar mapping will exhibit
231229
visible jittering when far away from the world origin.
230+
- :ref:`class_GPUParticles3D` nodes with **Local Coords** disabled will not benefit
231+
from increased precision. This can cause visible particle snapping to occur
232+
when far away from the world origin. Nodes with **Local Coords** enabled,
233+
as well as :ref:`class_CPUParticles3D` nodes, will still benefit from increased precision.
234+
- Shaders using the ``skip_vertex_transform`` or ``world_vertex_coords`` don't
235+
benefit from increased precision.
232236
- In double-precision builds, world space coordinates in a shader ``fragment()``
233237
function can't be reconstructed from view space, for example:
234238

235239
.. code-block:: glsl
236240
237241
vec3 world = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
238-
242+
239243
Instead, calculate the world space coordinates in the ``vertex()`` function and
240244
pass them using a :ref:`varying<doc_shading_language_varyings>`, for example:
241245

242246
.. code-block:: glsl
243-
247+
244248
varying vec3 world;
245249
void vertex() {
246250
world = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
247251
}
248252
249-
250253
2D rendering currently doesn't benefit from increased precision when large world
251254
coordinates are enabled. This can cause visible model snapping to occur when
252255
far away from the world origin (starting from a few million pixels at typical

0 commit comments

Comments
 (0)