Quantcast
Channel: Question and Answer » webgl
Browsing index pages (56 articles)

Determining if webgl code will work on a variety of hardware

I have some javascript/webgl code. I want to have some idea of whether it will work for someone with a different browser/machine/gpu. This is difficult, because there’s so much diversity in support for...

View Article


Unity 3D error when compiling to WebGL: Destination directory not found

When I try to compile my Unity project to WebGL in Development mode on Windows 8.1 (and with the latest version of Unity), I receive the following errors (the first one is truncated because it’s really...

View Article


Unity WebGL not loading on chrome

I’ve made a simple game but when I tried to load this on chrome its not loading. I am building for WebGL (HTML 5). I am getting these errors when the page loads. Unity version – 5.3.1f1 Chrome version...

View Article

Image may be NSFW.
Clik here to view.

Cell Based Simulation

I’m working on a cell based simulation in a pixel shader (webgl, shadertoy.com specifically), but am having some challenges trying to make the simulation consistent. Each cell (pixel) has the following...

View Article

GPU Spatial Clustering

I have a around 100k points on the screen (that might update). 2D points. The goal is to cluster them into groups, by a constant distance. Meaning, finding groups of points that the distance between...

View Article


Image may be NSFW.
Clik here to view.

Unity — custom shader behaves differently on WebGL deployment (correct) and...

I started working on shaders and lighting on Unity3D 5.2.1f1. I set up a scene where the sun object rotates the directional light (the only light in the scene) based on its position to simulate a light...

View Article

Unstable behavior when applying impulse

I created a video that describes the problem since it very hard to explain it. Basically, using physi.js, I am applying random impulse on the object. In the video, at 0:17 the problem begins when the...

View Article

Image may be NSFW.
Clik here to view.

How to hide a post-processed mesh outline when/where the mesh is hidden

I’m working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some...

View Article


Image may be NSFW.
Clik here to view.

Understanding webgl min/mag filter texture artifacts in orthographic projection?

Summary Flickering and shimmering of image plotted on a geometry where the viewport exceeds the size of the screen. I am using an orthographic projection for the camera. In this case, it is tied to...

View Article


Pass uniforms to Filter's shader

I wanna implement this shader (https://www.shadertoy.com/view/MslGWN#) in PhaserJS state. So i transformed the shader to WebGL style. I overload Phaser.Filter’s update function to pass iChannel...

View Article

Timers and performance for mobile JS

I’m using the Three.js JavaScript library to do some things in WebGL, and I wonder how the graphic aspects of timers are done on mobile. I was creating numbers with geometries and just replacing them...

View Article

Virtual infinite plane in shadow map

I have a WebGL deferred rendering pipeline, where I’m rendering shadow map with VSM technique. The goal is that the scene, or model, is hovering in space, and in addition to casting shadow on itself,...

View Article

How to use quaternion on another referential

I’m new on Three.js and despite a mechanical background, I can’t find how quaternion works: it’s like it always refers on local part referential and not the global one. I’ve illustrated it here :...

View Article


WebGL techniques for normal mapping on morph targets?

I’m currently morphing some meshes by interpolating their positions and normals between target arrays, on the GPU, in WebGL. Now I need to apply normal maps to those morphs. For normal maps on static...

View Article

Image may be NSFW.
Clik here to view.

WebGL – send part of texture to GPU

I have a matrix of pixels in RAM memory, e.g. 1000×1000 pixels. I send it to GPU using gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1000,1000, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels); Which works great. But...

View Article


Image may be NSFW.
Clik here to view.

Low quality bilinear sampling in WebGL/OpenGL/DirectX

I’m seeing low quality bilinear texture sampling in WebGL, OpenGL and Directx, and was wondering if anyone knew how to make it higher quality? The picture below should help show what I mean. The left...

View Article

Image may be NSFW.
Clik here to view.

Can I use a 3-dimensional simplex noise implementation to generate noise over...

Say, I want to generate noise over a sphere. I want to do this to procedurally generate three-dimensional ‘blobs’. And use these blobs to generate low poly trees, somewhat like this: Can I accomplish...

View Article


Techniques for drawing lines, with mouse, on 3D objects in WebGL or OpenGL?

Can anyone point me to techniques for drawing lines, with the mouse, on 3D objects in WebGL or OpenGL? Here’s the effect I’m looking for, using WebGL: http://www.spacegoo.com/cadillac/ I can imagine...

View Article

How to inform WebStorm's autocomplete about WebGLRenderingContext

I’m working on a project involving WebGL, and using WebStorm to do the development. One issue with the development flow is that WebStorm isn’t about to autocomplete things related to WebGL. In...

View Article

WebGL Multiple Lights, Blending, and Render Order

I am trying to do simple forward rendering for multiple lights using additive blending in WebGL. Following advice from this SO and this one, I simply turn on blending using glBlendFunc(GL_ONE, GL_ONE)...

View Article
Browsing index pages (56 articles)


Latest Images