From: Mikko Rasa Date: Sun, 14 Mar 2021 17:35:01 +0000 (+0200) Subject: Fix the declaration of the builtin textureLod function X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=21744dfe3d07a94dfdd508b801932d5bfd015a99;p=libs%2Fgl.git Fix the declaration of the builtin textureLod function --- diff --git a/builtin_data/_builtin.glsl b/builtin_data/_builtin.glsl index 61e7519f..aa36d5c6 100644 --- a/builtin_data/_builtin.glsl +++ b/builtin_data/_builtin.glsl @@ -436,13 +436,13 @@ float texture(samplerCubeShadow sampler, vec4 P); float texture(sampler1DArrayShadow sampler, vec3 P); float texture(sampler2DArrayShadow sampler, vec4 P); float texture(samplerCubeArrayShadow sampler, vec4 P, float compare); -vec4 textureLod(sampler1D sampler, float P); -vec4 textureLod(sampler2D sampler, vec2 P); -vec4 textureLod(sampler3D sampler, vec3 P); -vec4 textureLod(sampler1DArray sampler, vec2 P); -vec4 textureLod(sampler2DArray sampler, vec3 P); -vec4 textureLod(samplerCube sampler, vec3 P); -vec4 textureLod(samplerCubeArray sampler, vec4 P); +vec4 textureLod(sampler1D sampler, float P, float lod); +vec4 textureLod(sampler2D sampler, vec2 P, float lod); +vec4 textureLod(sampler3D sampler, vec3 P, float lod); +vec4 textureLod(sampler1DArray sampler, vec2 P, float lod); +vec4 textureLod(sampler2DArray sampler, vec3 P, float lod); +vec4 textureLod(samplerCube sampler, vec3 P, float lod); +vec4 textureLod(samplerCubeArray sampler, vec4 P, float lod); vec4 texelFetch(sampler1D sampler, int P, int lod); vec4 texelFetch(sampler2D sampler, ivec2 P, int lod); vec4 texelFetch(sampler3D sampler, ivec3 P, int lod); diff --git a/scripts/builtin_funcs.py b/scripts/builtin_funcs.py index 0022f40c..e7618877 100755 --- a/scripts/builtin_funcs.py +++ b/scripts/builtin_funcs.py @@ -156,7 +156,7 @@ shared_funcs = [ ("vec4 texture(T sampler, float[T::CDim] P)", colorsamplertypes), ("float texture(T sampler, float[T::CDim] P)", tuple(s for s in shadowsamplertypes if "CubeArray" not in s)), "float texture(samplerCubeArrayShadow sampler, vec4 P, float compare)", - ("vec4 textureLod(T sampler, float[T::CDim] P)", colorsamplertypes), + ("vec4 textureLod(T sampler, float[T::CDim] P, float lod)", colorsamplertypes), ("vec4 texelFetch(T sampler, int[T::CDim] P, int lod)", flatsamplertypes) ]