diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 1584745c1..7c497308e 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -151,14 +151,17 @@ float Texel(sampler2DArrayShadow s, highp vec4 c) { return texture(s, c); } uniform mediump float deprecatedTextureCall; vec4 texture2DDeprecated(sampler2D s, vec2 c) { return texture(s, c) + deprecatedTextureCall; } +vec4 texture3DDeprecated(sampler3D s, vec3 c) { return texture(s, c) + deprecatedTextureCall; } vec4 textureCubeDeprecated(samplerCube s, vec3 c) { return texture(s, c) + deprecatedTextureCall; } #ifdef PIXEL vec4 texture2DDeprecated(sampler2D s, vec2 c, float b) { return texture(s, c, b) + deprecatedTextureCall; } +vec4 texture3DDeprecated(sampler3D s, vec3 c, float b) { return texture(s, c, b) + deprecatedTextureCall; } vec4 textureCubeDeprecated(samplerCube s, vec3 c, float b) { return texture(s, c, b) + deprecatedTextureCall; } #endif #define texture2D texture2DDeprecated +#define texture3D texture3DDeprecated #define textureCube textureCubeDeprecated float gammaToLinearPrecise(float c) { diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index 1a56356d4..a423453a4 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -1602,7 +1602,7 @@ int w_newShader(lua_State *L) { Shader *shader = instance()->newShader(stages, options); if (shader->isUsingDeprecatedTextureFunctions()) - luax_markdeprecated(L, 1, "texture2D() or textureCube() function calls in shader code", API_CUSTOM, DEPRECATED_REPLACED, "texture() function calls"); + luax_markdeprecated(L, 1, "texture2D() or texture3D() or textureCube() function calls in shader code", API_CUSTOM, DEPRECATED_REPLACED, "texture() function calls"); if (shader->isUsingDeprecatedTextureUniform()) luax_markdeprecated(L, 1, "'texture' uniform variable name in shader code", API_CUSTOM, DEPRECATED_NO_REPLACEMENT, ""); if (!shader->getUnsetVertexInputLocationsString().empty()) @@ -1640,7 +1640,7 @@ int w_newComputeShader(lua_State* L) { Shader *shader = instance()->newComputeShader(stages[0], options); if (shader->isUsingDeprecatedTextureFunctions()) - luax_markdeprecated(L, 1, "texture2D() or textureCube() function calls in shader code", API_CUSTOM, DEPRECATED_REPLACED, "texture() function calls"); + luax_markdeprecated(L, 1, "texture2D() or texture3D() or textureCube() function calls in shader code", API_CUSTOM, DEPRECATED_REPLACED, "texture() function calls"); if (shader->isUsingDeprecatedTextureUniform()) luax_markdeprecated(L, 1, "'texture' uniform variable name in shader code", API_CUSTOM, DEPRECATED_NO_REPLACEMENT, ""); if (!shader->getUnsetVertexInputLocationsString().empty())