zTexture = createTexture();
bindTexture(TEXTURE_2D, zTexture);
texParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, LINEAR);
texParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, LINEAR);
texParameteri(TEXTURE_2D, TEXTURE_WRAP_S, CLAMP_TO_EDGE);
texParameteri(TEXTURE_2D, TEXTURE_WRAP_T, CLAMP_TO_EDGE);
texImage2D(TEXTURE_2D, 0, DEPTH_COMPONENT24 , width, height, 0, DEPTH_COMPONENT, UNSIGNED_INT, null);
framebufferTexture2D(FRAMEBUFFER, DEPTH_ATTACHMENT, TEXTURE_2D, zTexture, 0);
but I got an error:
RENDER WARNING: texture bound to texture unit 1 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
I also tried to use OES_texture_float_linear extension, but it did not help.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't believe depth formats are "filterable", in which case you'd need to do filtering manually in your shader.
On Fri, Apr 19, 2019, 10:50 AM Дмитрий Зырянов <dmit...@gmail.com> wrote:
Hi!--Is there a way to create FBO with depth texture with linear filtering in webgl 2?I do it like this:
zTexture = createTexture();
bindTexture(TEXTURE_2D, zTexture);
texParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, LINEAR);
texParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, LINEAR);
texParameteri(TEXTURE_2D, TEXTURE_WRAP_S, CLAMP_TO_EDGE);
texParameteri(TEXTURE_2D, TEXTURE_WRAP_T, CLAMP_TO_EDGE);
texImage2D(TEXTURE_2D, 0, DEPTH_COMPONENT24 , width, height, 0, DEPTH_COMPONENT, UNSIGNED_INT, null);
framebufferTexture2D(FRAMEBUFFER, DEPTH_ATTACHMENT, TEXTURE_2D, zTexture, 0);but I got an error:RENDER WARNING: texture bound to texture unit 1 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.I also tried to use OES_texture_float_linear extension, but it did not help.
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-d...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.