Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 44157

WebGL is a Javascript API for rendering interactive 3D / 2D graphics on the HTML5 canvas element. It is based on OpenGL ES 2.0.

4 votes
2 answers
2k views

Confused about Max Vertex Uniform Vector limit

How would I find the true upper limit value (and read it inside my WebGL app at the runtime)? … EDIT: Ok, I've found out how to get this parameter inside a WebGL app: gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS), but the question now is how would I adapt it to shaders... …
Winged's user avatar
  • 340
2 votes
1 answer
2k views

Omni-directional light shadow mapping with cubemaps in WebGL

My goal is to achieve a simple omni-directional (point) light type shading in my WebGL application. … Also in WebGL depth components are not well supported, so I need to render it to RGBA first. …
Winged's user avatar
  • 340
2 votes
2 answers
841 views

Linking one uniform variable to many shaders

Let's say, that I have 3 programs, and in each of those programs there is a view matrix uniform, which should be the same in all those programs. Right now, when my camera moves, I need to re-upload t …
Winged's user avatar
  • 340
2 votes
2 answers
2k views

Strange if-else branching behavior in a fragment shader

In my fragment shader I have passed an uniform int uLightType variable, which indicates what type of light is in usage right now. The problem is that if-else branching does not work correctly - the fr …
Winged's user avatar
  • 340
0 votes
1 answer
2k views

One draw call with one big mesh VS many draw calls with many little meshes

I have read that in order to optimize WebGL application, one should reduce an amount of draw calls. …
Winged's user avatar
  • 340
1 vote
1 answer
1k views

Custom lookAt function goes wild

I have written a custom lookAt function based on a lot of posts from all over the net, and it works very nice... except when a rotation (which is stored in a quaternion) crosses some 'threshold'. Howe …
Winged's user avatar
  • 340
4 votes
1 answer
3k views

How can I restrict the rotation of an object to a subset of axes using quaternions?

I've got a question about quaternions in my WebGL application. How can I rotate an object only around two axes? For example, how can I exclude/nullify rotation about the Y axis? …
Winged's user avatar
  • 340
0 votes
1 answer
791 views

Strange quaternion camera streching in WebGL

So after a lot of researching about quaternions I almost got the quaternion camera working. Almost, cause it rotates in a proper way only in a vertical axis. Other rotations stretches and deforms the …
Winged's user avatar
  • 340