Questions tagged [webgl]

WebGL extends the capability of the HTML canvas element to allow it to render accelerated graphics in any compatible web browser. **DO NOT TAG QUESTIONS ABOUT 3D LIBRARIES (like THREE.js) WITH THIS TAG** unless the question is specifically about a WebGL API feature. **DO NOT TAG QUESTION ABOUT UNITY WEBGL WITH THIS TAG!!**

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

Is it possible to have the objects I draw not have the image I set as the background?

I have this program where my canvas assumes a WebGL context and I'm trying to upload an image as the background, but when I do so, everything becomes the image itself: I achieved this by fiddling ...
0
votes
0answers
19 views

Align Three.js cube with html element

Please help! Is there a way to scale the box geometry to align with the HTML element in my page. I have a responsive .container element and a canvas in the background, and I need this cube to always ...
1
vote
0answers
27 views

three js shadow clapping?

The shadows are weird. Shadows are normally output only in certain areas. What happend? mycode: // plane export const plane = new THREE.Mesh( new THREE.PlaneGeometry(500, 500), new THREE....
0
votes
1answer
28 views

three.js MeshLine vertex implementation

I'm struggling with correct vertex shader implementation for fat lines. I tried using spite/MeshLine, but it hasn't proper mitering which is a must for me. Therefore I started my own implementation (...
0
votes
1answer
42 views

Why can't I render to a floating point texture in webgl?

I am creating a framebuffer and attaching a texture to it. Here is the texture that I would like to attach(but is not working): gl.texImage2D(gl.TEXTURE_2D, 0, gl.R32F, sphere_texture.width, ...
0
votes
1answer
39 views

What are the latest versions of OpenGL ES supported by emscripten, and how do I use them?

I am trying to make use of some ES 3.1 features, and it's unclear if this is supported: I notice that there is an OpenGL ES 3.1 header in the emscripten repository which defines some of the functions ...
1
vote
1answer
58 views

How can I get a field of WebGlContextAttributes?

My case is like this, I just want to get the field of WebGlContextAttributes struct. let antialias_info = gl.get_context_attributes().unwrap(); match antialias_info.antialias { // ... } I get the ...
0
votes
0answers
35 views

How do I sync framebuffer size with canvas size when using WebGL with emscripten?

When a WebGL canvas element changes size, it would be most correct to change the framebuffer size to match the new dimension. If this isn't done, then either the content will look blurry (framebuffer ...
0
votes
0answers
103 views

Unity WebGl build is working in unity, but not working on the server

When I build and run as webgl in unity it works perfectly (on local server), however when I upload it to my server, and try to run it, I get the following error: Unable to load file Build/web_gl_3....
1
vote
0answers
55 views

Unity3d. WebGL. UI raycast targets don't get rotated when rotating html-container with css

I have stumbled upon strange behaviour on WebGL when rotating html-container with css. It works for everything, but raycast targets of ui elements. So all the elements look rotated, but their ...
1
vote
0answers
60 views

Trying to convert Stacked BarPlot from D3 to Aframe

As the title suggests, I am trying to convert a Stacked BarPlot from D3 (version 4) to Aframe (using the AR.js library). The D3 example I am using can be found here: https://www.d3-graph-gallery.com/...
0
votes
0answers
29 views

What is the fractional precision of highp clip space coordinates in WebGL and WebGL2?

In MDN it says that: In WebGL1, the precision of highp is 2^-16, which is 0.00001525878. In other words, I only have the "resolution" of 5 digits after the decimal point, right? In WebGL2, ...
1
vote
0answers
53 views

Display large vector collections in WebGL

I was looking at three.js as a replacement of deck.gl in our existing WebGL software, for reasons not relevant to this question. One of the input data sources is large vector data exported from CAD ...
1
vote
1answer
54 views

Rotating 2d in WebGL

How to rotate and scale 2d objects in WebGL? I think we will make changes in the "vPostion" part, but I could not set it fully. javascript: function render() { tMatrix = mat4(); ...
-1
votes
0answers
24 views

How to draw unlimited canvas elements in a single page with using WebGL

I'm working on a heatmap calendar, canvas-based component. It takes into account the (practical) maximum canvas size and creates multiple canvas as needed, so that you can let the component display ...

15 30 50 per page