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

fix: raster with luminance in webgl1 #2490

Merged
merged 1 commit into from
May 21, 2024
Merged
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
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
Loading