From 1c2a030049df2d5438dab9a7afa7d888eea78032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=A4=A9?= Date: Fri, 22 Dec 2023 20:06:28 +0800 Subject: [PATCH] Update textureQueryLevels to mention it returns 1 when the texture is unassigned --- tutorials/shaders/shader_reference/shading_language.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/shaders/shader_reference/shading_language.rst b/tutorials/shaders/shader_reference/shading_language.rst index 646cfe39f4b..e63bfccef23 100644 --- a/tutorials/shaders/shader_reference/shading_language.rst +++ b/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) | |