Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU support for rendering to RG11B10 format #5824

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/platform/graphics/webgl/webgl-graphics-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ class WebglGraphicsDevice extends GraphicsDevice {
this.extVertexArrayObject = true;
this.extColorBufferFloat = this.getExtension('EXT_color_buffer_float');
this.extDepthTexture = true;
this.textureRG11B10Renderable = true;
} else {
this.extBlendMinmax = this.getExtension("EXT_blend_minmax");
this.extDrawBuffers = this.getExtension('WEBGL_draw_buffers');
Expand Down
1 change: 1 addition & 0 deletions src/platform/graphics/webgl/webgl-texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ class WebglTexture {
}
break;
case PIXELFORMAT_111110F: // WebGL2 only
Debug.assert(device.isWebGL2, "PIXELFORMAT_111110F texture format is not supported by WebGL1.");
this._glFormat = gl.RGB;
this._glInternalFormat = gl.R11F_G11F_B10F;
this._glPixelType = gl.UNSIGNED_INT_10F_11F_11F_REV;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/graphics/webgpu/webgpu-graphics-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class WebgpuGraphicsDevice extends GraphicsDevice {
// "depth32float-stencil8",
// "indirect-first-instance",
// "shader-f16",
// "rg11b10ufloat-renderable",
// "bgra8unorm-storage",

// request optional features
Expand All @@ -223,6 +222,7 @@ class WebgpuGraphicsDevice extends GraphicsDevice {
this.extCompressedTextureETC = requireFeature('texture-compression-etc2');
this.extCompressedTextureASTC = requireFeature('texture-compression-astc');
this.supportsTimestampQuery = requireFeature('timestamp-query');
this.textureRG11B10Renderable = requireFeature('rg11b10ufloat-renderable');
Debug.log(`WEBGPU features: ${requiredFeatures.join(', ')}`);

/** @type {GPUDeviceDescriptor} */
Expand Down