All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

how to draw thick line with texture in webgl?

thick line By extending the centerline to both sides, I finally drew a line with width using a triangle. However, when adding texture to the face, the arrow at the beginning and end is drawn correctly,...
0
votes
0answers
44 views

Is it possible to filter integer texture in WebGL?

I have read other posts (for example this) that shows how to render integer texture (R16I) via WebGL. However, it is using the gl.NEAREST for texture filtering for minification and magnification gl....
0
votes
0answers
15 views

WebGL FBO texture with transparent issue

So the questions is : When I am using webgl to render stuff to a FBO, let's say a quad with 512 * 512, if I set the color to be (1, 0, 0, 0.5), which means its alpha is 0.5 Then I use the color ...
1
vote
1answer
36 views

Apply texture to half of quad

I am working on a scene in threejs that renders an image of a cat. Specifically, I'd like to render a rectangle, and I'd like for the right half of that rectangle to be red, and for the left half of ...
0
votes
1answer
33 views

Scaling Video texture mixed with image texture

I've tried searching and is a trivial thing to do but can't figure it out, I looked at many answers but never answered what I need with full working examples. I am trying to scale the video texture in ...
2
votes
0answers
84 views

Black screen when trying to use multiple textures in Expo

I'm trying to use multiple textures in expo, but for some reason whenever I try to bind more than one texture, even if the texture is unused in the shader, nothing renders to the screen. Code that ...
0
votes
0answers
23 views

What size of texture should I use to transfer function?

I'm using a 2D texture like 1D texture (with 1 of height) to encode a transfer function. The range of values can be 5k, 15k till 64k depending on the image. Actually, I create a texture with size ...
0
votes
1answer
21 views

Is it possible to use texSubImage2D on a depth texture?

I'm following this tutorial on 2D shadow mapping and I've gotten it working in WebGL. Now, I am looking to develop a way to recompute single rows in the depth texture, without clearing the entire ...
0
votes
1answer
94 views

WebGL2 - Write to texture/buffer at arbitrary position - OpenGL imageStore equivalent

I already know how to write to a texture using Framebuffers. However, for a project I'm doing that requires FFT's, I need at a point to write, in the same shader, into more than one position of the ...
4
votes
1answer
160 views

How to share textures between a 2d Canvas and a WebGL canvas?

I'm developing a browser game using WebGL and the recommended advice seems to be to use either straight-up HTML elements or a 2d canvas layered on top of your WebGL canvas to do the UI / HUD. This is ...
-1
votes
2answers
170 views

Getting WebGLTexture by texture pointer

I'm working on a project using unity WebGL. What I need to do is to display the game scene in another browser window. So what I tried was I rendered the scene to RenderTexture, and send the texture ...
0
votes
0answers
79 views

WEBGL Displaying the texture works weird with vertex indices

I'm starting to play with webgl and I've already run into a problem. I want to build a cube and use as few vertices and indexes as possible. And it was partially successful. I only use 8 vertices and ...
1
vote
1answer
220 views

WEBGL P5js not showing image as texture

I'm trying to use an image as a texture for a plane in P5js using WEBGL, but for some reason it isn't working. I've tried to get rid of all the lighting and just use ambientLight() but still it isn't ...
0
votes
1answer
99 views

WebGL - When I read pixel data from frame buffer, icon loses its transparency

I have a transparent icon map. 256x256 I created a texture using this image. AddIconMap(imageUrl) { const image = new Image() const { gl } = this image.onload = () => { ...
0
votes
1answer
71 views

Best way to add texture elements to already textured object in webGL

I am currently creating a web configuration tool to create very simple buildings. I already have managed to create a layout editor with which you can arrange the 4 walls of the bulding via drag and ...

15 30 50 per page
1
2 3 4 5
19