TextureSampleLevel in compute shaders

Hello friends,

Below is my PlayGround code: https://playground.babylonjs.com/#7Y12O2#5

The code applies some “art-like” effects to an input texture. It employs textureSampleLevel() function + Bilinear interpolation to sample inputTexture.

I expect Bilinear interpolation to smooth out jagged edges. However, that did not work (attached photo), even though I see no error in console log. Can someone help point out what I am doing wrong ? Thanks

Constants.LINEAR_LINEAR_MIPLINEAR and Constants.NEAREST_NEAREST_MIPNEAREST don’t exist:

image

Use Constants.TEXTURE_NEAREST_SAMPLINGMODE and TEXTURE_TRILINEAR_SAMPLINGMODE instead (or TEXTURE_NEAREST_NEAREST_MIPNEARESTand TEXTURE_LINEAR_LINEAR_MIPLINEAR):

1 Like

Oh my dumbed mistake ! Thanks so much.