Skip to content

Commit

Permalink
fix: raster with luminance in webgl1
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed May 21, 2024
1 parent 8b72df1 commit f68dd56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/renderer/src/device/DeviceTexture2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export default class DeviceTexture2D implements ITexture2D {
pixelFormat = unorm ? Format.U8_RGBA_NORM : Format.U8_RGBA_RT;
} else if (type === gl.UNSIGNED_BYTE && format === gl.LUMINANCE) {
pixelFormat = Format.U8_LUMINANCE;
} else if (type === gl.FLOAT && format === gl.LUMINANCE) {
pixelFormat = Format.F32_LUMINANCE;
} else if (type === gl.FLOAT && format === gl.RGB) {
// @see https://github.com/antvis/L7/pull/2262
if (this.device.queryVendorInfo().platformString === 'WebGPU') {
Expand Down

0 comments on commit f68dd56

Please sign in to comment.