Skip to content

Commit efc648c

Browse files
works with texture gradients now
1 parent f1c60ea commit efc648c

File tree

1 file changed

+2
-1
lines changed
  • examples_tests/39.DenoiserTonemapper

1 file changed

+2
-1
lines changed

examples_tests/39.DenoiserTonemapper/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ nbl_glsl_complex nbl_glsl_ext_FFT_getPaddedData(in ivec3 coordinate, in uint cha
229229
const vec2 inputSize = vec2(nbl_glsl_ext_FFT_Parameters_t_getDimensions().xy);
230230
const vec2 halfInputSize = inputSize*0.5;
231231
const vec2 relativeCoords = vec2(coordinate.xy)-halfInputSize;
232-
const vec4 texelValue = textureLod(inputImage,(relativeCoords+vec2(0.5))/inputSize+vec2(0.5),0.0);
232+
const vec2 inputSizeRcp = vec2(1.0)/inputSize;
233+
const vec4 texelValue = textureGrad(inputImage,(relativeCoords+vec2(0.5))*inputSizeRcp+vec2(0.5),vec2(inputSizeRcp.x,0.0),vec2(0.0,inputSizeRcp.y));
233234
return nbl_glsl_complex(texelValue[channel], 0.0f);
234235
}
235236
#define _NBL_GLSL_EXT_FFT_GET_PADDED_DATA_DEFINED_

0 commit comments

Comments
 (0)