All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
0
votes
1answer
55 views

Which functions go with which targets in OpenGL / WebGL?

My apologies if I am phrasing this question poorly. Is there anywhere I can find a list of OpenGL/WebGL functions along with the targets they are associated with? For example, in order to call ...
2
votes
1answer
62 views

Convert fragment shader gradient result from black to transparent in GL ES

I'm trying to generate realistic stars for an open source game I'm working on. I'm generating the stars using principles covered here. I'm using the three.js library in a Chromium engine (NW.js). The ...
0
votes
0answers
79 views

difference between canvas and gl.canvas

in WebGL, we create a rendering context with const canvas = document.getElementById("#mycanvas"); let gl = canvas.getContext("webgl2"); in every operation I see people using gl....
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 ...
1
vote
1answer
112 views

getUniformLocation return null

I have a uniform in my fragment shader and when I try to get the value of the location of the uniform, it returns null. I checked the spelling and I don't find any spelling error and this uniform is ...
0
votes
0answers
20 views

in webgl, after apply perspective matrix, how to set modelViewMatrix's z coordinate to make the output's shape size equals i setted initial? [duplicate]

this is vshader: const vsSource = ` attribute vec4 aVertexPosition; attribute vec2 aTextureCoord; uniform mat4 uModelViewMatrix; uniform mat4 uProjectionMatrix; varying highp ...
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 ...
0
votes
0answers
29 views

Rotate the 3D camera relatively to the two points

I have a 3d scene in AR, also I have a task to make the scene moveable/rotatable around the camera point. BTW, The scene has a kinda big scale, so when you entered an AR you can see objects in full ...
1
vote
2answers
120 views

Color a set of fragments in fragment shader

My goal is to color a set of fragments determined by the interpolation between two points. Below the code I've written, It didn't work.!. I also added some comments, Probably there are some mistakes I ...
0
votes
1answer
47 views

In WebGL or OpenGL is it bad to use an output fragment variable as temp storage?

Ignoring coding patterns and code clarity/quality: This is a question I just don't know if it's inherently bad or inconsequential. I can't find enough on the inner workings of assigning to say: ...
1
vote
1answer
142 views

Get transformed 3D Vertices

I've got a webgl shader which generates a model for me based on three.js using a skeleton and a SkinnedMesh (see example image below). The problem with that is that three.js does not to my knowledge ...
2
votes
0answers
143 views

Is there a way to create directional light in 2D?

In processing there is a function that creates directional light in 3D. But i wanna create the same effect in 2D. I think i need a vector and color info so i can create a shadow effect on a image. ...
0
votes
1answer
263 views

WebGL2 texImage2D 16-bit then readPixels 16-bit problem

Is it possible to create a 16-bit 2d texture image and retrieve the original 16-bit values using readPixels? I made a jsfiddle where I input and draw a green gradient in 16-bit pixels. I then use ...
3
votes
0answers
82 views

WebGL triangle wrong lighting

I have a question, probably similar to this one: WebGL shading/lighting too dark on some triangles I am trying to port one of my old exercises from C++ OpenGL which uses deprecated glaux, to WebGL. ...

15 30 50 per page
1
2 3 4 5
41