Explorar el Código

Merge pull request #8669 from jsjtxietian/patch-1

Update textureQueryLevels to mention it returns 1 when the texture is unassigned
Matthew hace 1 año
padre
commit
fb31598828
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      tutorials/shaders/shader_reference/shading_language.rst

+ 2 - 2
tutorials/shaders/shader_reference/shading_language.rst

@@ -1269,8 +1269,8 @@ is used, it can be scalar or vector.
 +-----------------------------------------------------------------------------+---------------------------------------------------------------------+
 | int **textureQueryLevels** (gsampler2D s)                                   | Get the number of accessible mipmap levels of a texture.            |
 |                                                                             |                                                                     |
-| int **textureQueryLevels** (gsampler2DArray s)                              | If the texture is unassigned to a sampler, ``0`` is returned.       |
-|                                                                             |                                                                     |
+| int **textureQueryLevels** (gsampler2DArray s)                              | If the texture is unassigned to a sampler, ``1`` is returned (Godot |
+|                                                                             | always internally assigns a texture even to an empty sampler).      |
 | int **textureQueryLevels** (gsampler3D s)                                   |                                                                     |
 |                                                                             |                                                                     |
 | int **textureQueryLevels** (samplerCube s)                                  |                                                                     |