Quantcast
Channel: Question and Answer » webgl
Browsing all 56 articles
Browse latest View live

Is there an out-of-the-box way to create a custom non-convex polygon in...

Does Three.js offer an out-of-the-box way to create custom non-convex polygon, or do I have to use THREE.Geometry and set faces manually? I’m guessing that ShapeGeometry has something to do with this,...

View Article



How to draw a circle with WebGL using GL_POINTS [closed]

I’m trying to draw a circle using simple vertices points and a big gl_PointSize value. I found this example and try to reproduce it on WebGL with no success.

View Article

Why is WebGL disabled in Safari

I know how to enable WebGL in Safari (6.0.5) for OS X and I am able to visualize and interact with WebGL based content, however I don’t understand why is this technology disabled by default if the...

View Article

Image may be NSFW.
Clik here to view.

scaling point sprites with distance

How can you scale a point sprite by its distance from the camera? GLSL fragment shader: gl_PointSize = size / gl_Position.w; seems along the right tracks; for any given scene all sprites seem nicely...

View Article

Image may be NSFW.
Clik here to view.

blending with the foreground but not the background

I want to draw some very-semi-transparent objects on top of my scene and have them blend nicely with the other pixels in the scene, but not blend with the background; if I draw a semi-transparent...

View Article


Strategies for making money with WebGL based game

I’m curious about how people making WebGL based games will make money. If they require a server connection I guess they can make money the old fashioned way. Will people pay for a browser based game,...

View Article

How to manage frustum culling

I have a spherical clipmap based planet terrain. The entire planet is made from a ring geometry of 1 unit which the vertex shader moves to cover the entire planet of 6 million unit radius. But the...

View Article

Firefox 25 displaying as not supporting WebGL [on hold]

I am using the latest stable version of Firefox, viz. 25, but it shows as WebGL is not supported. It does not load any of the WebGL examples and the website DoesMyBrowserSupportWebGL says Nay. How can...

View Article


Image may be NSFW.
Clik here to view.

Textures occasionally rendering twice on a particular face

I am learning how to render 3D objects using webgl (no third-party libraries). I am currently facing a very confusing situation however, where my textures are rendering apparently twice over a...

View Article


Image may be NSFW.
Clik here to view.

How can I compute spotlight attenuation when I only have a spotlight cutoff...

I am trying to compute the spot light attenuation, though I don’t have a spotCosCutoff (cosine of the spotlight cutoff angle) predefined variable in the shader so I have to compute it myself. This is...

View Article

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

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? The problem is that...

View Article

How would one outline an alpha transparency layer in javscript and/or php?...

This question already has an answer here: outline object effect 3 answers

View Article

WebGL wrong scaling of rectangle

I’m working with this tutorial http://www.html5rocks.com/en/tutorials/webgl/webgl_transforms/ and my result is, that the rectangle moves in the direction of it’s scaling values, and also scales at the...

View Article


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 the...

View Article

Image may be NSFW.
Clik here to view.

GPU skinning algorithm incorrectly distorts mesh

I’ve been trying to implement a GPU-based matrix palette skinning algorithm with WebGL, but the rendering appears incorrect even though I can’t find evident conceptual problems in the underlying...

View Article


Image may be NSFW.
Clik here to view.

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...

View Article

Is HTML5/WebGL performance unreliable on low-end Android tablets and phones?

I’ve developed a couple of WebGL games, and am trying them out on Android. I found that they run very slowly on my tablet, however. For example, a game with 10 sprites or so runs as 5fps. I tried...

View Article


List of GLSL ES built-in variables

I am writing an article on WebGL and three.js, I’m trying to search all the built-in variables available in the vertex and fragment shader. I’ve found many sites mentioning some, for example: Vertex...

View Article

How to use blender files in your own engine?

It is not trivial to use your own shader on blender, so I’ve created a good-looking webgl shader. Now, what do I need to use the things I made in blender on it? An obvious first idea would be to parse...

View Article

Web-Based Traffic Simulation based on Discrete Event SImulation + AI

I’m working on the application of 2D web-based traffic simulation. I am looking for a library that is suitable for my application. I’m making an application based on discrete event simulation, each...

View Article
Browsing all 56 articles
Browse latest View live




Latest Images