antvis / g-device-api

A Device API references WebGPU implementations
https://observablehq.com/@antv/g-device-api
8 stars 1 forks source link

使用 createTexture2D format gl.LUMINANCE 问题 #188

Closed lvisei closed 1 month ago

lvisei commented 1 month ago

WebGL1 使用 gl.LUMINANCE 报错,from https://github.com/antvis/L7/blob/beta/packages/layers/src/raster/models/raster.ts#L97

createTexture2D({
    data: new Float32Array(data),
    width,
    height,
    /**
     * WebGL1 allow the combination of gl.LUMINANCE & gl.FLOAT with OES_texture_float
     */
    format: queryVerdorInfo() === 'WebGL1' ? gl.LUMINANCE : gl.RED,
    type: gl.FLOAT,
    alignment: 1,
 });
Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Problem using createTexture2D format gl.LUMINANCE