question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Uint8Array as a Texture

See original GitHub issue

Hi I have a feature request, I’m unable to utilize a Uint8Array as a source for a texture. Having this would be a flexible feature for some projects utilizing raw image data arrays both web and native.

For reference I’m using gl-react on react-native.

<Node
    width={nodeWidth}
    height={nodeHeight}
    shader={shaders.node}
    uniforms={{
        texture: { width: textureWidth, height: textureHeight: data: textureUint8Array },
    }}
    clear={null}
/>

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
wyhintoncommented, Jan 7, 2022

It’d be great if there was an example showing how to use the Uint8Array to make a data texture, perhaps something to the effect of this tutorial? https://webglfundamentals.org/webgl/lessons/webgl-qna-how-to-get-audio-data-into-a-shader.html

1reaction
Lemon-Kingcommented, Mar 13, 2021

Actually, gonna reopen this since it could use further documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uint8Array - JavaScript - MDN Web Docs
Chrome Edge Uint8Array Full support. Chrome7. Toggle history Full support. Edge12... Uint8Array() constructor Full support. Chrome7. Toggle history Full support. Edge12... Constructor without parameters Full support....
Read more >
webgl textures in combination with an externalized arrayBuffer ...
i am using a webgl canvas with textures in electron. gl. ... In io.js v3.1.0 they have reimplemented Buffer as Uint8Array, and I...
Read more >
Creating a texture (image) from uint8Array - Stack Overflow
I'm trying to go from a JPG on the web to create a texture with uint8Array. I need uint8Array as it's an API...
Read more >
WebGPU - W3C
Functionality that is part of a feature may only be used if the feature was requested at device creation (in requiredFeatures ).
Read more >
Feature Request - Include CubeTexture Input in Node Material ...
it's possible add this feature? Thanks. Deltakosh August 12, 2022, 4:11pm #2. Well NME supports cube texture:)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found