Skip to content

Commit

Permalink
pixelformat cubemap
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Oct 31, 2023
1 parent 9a45660 commit 3b8b82f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libs/cgl/cubemapframebuffer/cubemaptexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CubemapTexture
// this.filter = CGL.Texture.FILTER_NEAREST;
// }

this._setFilter();

const info = Texture.setUpGlPixelFormat(this._cgl, this._options.pixelFormat);

if (CGL.Texture.isPixelFormatHalfFloat(info.pixelFormat))
Expand All @@ -96,7 +96,6 @@ class CubemapTexture
if (!this._cgl.enableExtension("EXT_color_buffer_half_float_linear"))
{
this._options.filter = Texture.FILTER_NEAREST;
this.setFilter(this._options.filter);
}
}
else if (CGL.Texture.isPixelFormatFloat(info.pixelFormat))
Expand All @@ -105,10 +104,9 @@ class CubemapTexture
{
console.log("no linear pixelformat,using nearest");
this._options.filter = Texture.FILTER_NEAREST;
this.setFilter(this._options.filter);
}
}

this._setFilter();

for (let i = 0; i < 6; i++)
{
Expand Down

0 comments on commit 3b8b82f

Please sign in to comment.