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

learn more… | top users | synonyms

1
vote
0answers
23 views

how to replace vertex buffer in webGL

I want to replace a vertex buffer with another completely different vertex buffer, different size and values, it will not get replaced every frame. gl.deleteBuffer(vertexBuffer); vertexBuffer = gl....
0
votes
1answer
28 views

how to use unity3d webgl content in a asp.net mvc view?

I asked this question in stackoverflow but no answers so I think it would fit here better. I have a unity webgl project and an asp.net mvc project. I need to show the webgl content in a view. The ...
0
votes
1answer
28 views

WebGL Redirecting URL

If player's browser don't support WebGL, I want to redirect Web Player version. I think it's possible in UnityLoader.js file but how? function CompatibilityCheck(){hasWebGL?mobile?confirm("Please ...
0
votes
1answer
32 views

Webgl: is possible to use one color buffer to unsharp masking the depth buffer?

I'm noob to webgl. After reading the tutorials at webglfundamentals.org and "Introduction to Computer Graphics", i'm able to succesfully draw some stuff and the depth buffer without thirty-party ...
0
votes
0answers
20 views

Emscripten / webgl lazy rendering?

I compiled existing opengl es 2.0 code to webgl using emscripten. In the desktop version there is lazy rendering mechanism that only renders when required which is basically just saying invalidate ...
1
vote
0answers
73 views

Webgl: pixel perfect tilemap rendering?

The problem described below is a follow-up of Seamless tilemap rendering (borderless adjacent images). I'm not sure to fully understand the rendering issue I have, so I'll try to describe as much as ...
1
vote
0answers
27 views

Unity WebGL responsive

I am trying to embed Unity WebGL to a web page. I wonder, is it possible to make this responsive, so it will always fit whatever the screen size? How to do that? Thank you for answering.
0
votes
0answers
59 views

WebGL Primitive Batching unexpected performance

I'm kinda new to WebGL in general, I've started to make some batching experiences on primitives (just drying a bunch of rectangles by using a combination of two triangles repeatedly). I've started by ...
0
votes
1answer
28 views

Webgl, weird rendering with sprite that has alpha

So I have a webgl application where I render all kinds of objects, but in this specific example, I have two shaders. One that renders sprites and one that renders colored polygons. In this example I ...
0
votes
0answers
61 views

Cannot load native dll in Unity webgl build

I'm trying to use NAudio to get a mp3 (using WWW) into an Audioclip. The thing is NAudio uses Msacm32.dll which I tried adding to the project, but the webgl build still cannot find it. The standalone ...
0
votes
0answers
35 views

How to implement mesh subtraction with user interaction in real-time?

I am trying to perform a subtraction on 2 mesh files imported from objloader using THREE.js and ThreeCSG but it is not working as long as the objects are too big or not closed or it will be so slow. ...
0
votes
0answers
32 views

Access Unity Webgl output from browser and vice versa

I receive a package of Unity webgl and put that into a course in Wordpress. The index.html produced form Unity is accessed inside an iframe there. This must be able to count user click when accessing ...
0
votes
0answers
82 views

Unreal Engine - Why is the size of even the most minimal HTML5 project ~ 155 MB?

I created a new project in UE4 (ver 4.10.4) with "no starter content" and "scalable to 2D/3D" settings. Essentially, there are a total of 5 assets in the project 1) floor, 2) light source, 3) sky ...
1
vote
1answer
147 views

Unexpected quaternion rotation behavior

First off let me apologize for the vague title but I really couldn't think of a more descriptive one (maybe after reading this a more advanced user might be able to edit it). Alright, so I have been ...
0
votes
1answer
154 views

unity webgl not working on server

I own the servers of hokuco.com, I am wondering why my test build(not a development build) is not working in webgl I tried a test run as a .exe and it works fine. here is the url to my webgl project, ...
1
vote
0answers
46 views

How can I center a WebGL window in Unity?

I have a WebGL build for my game, however, I'm getting frequent requests to center the image. Right now it is left justified. How can I center the WebGL game window?
0
votes
1answer
42 views

How to display a lot of small objects using WebGL?

Introduction The game scene contains a lot of 10x10 pixel elements: for 1980x1200 px. screen the number of elements on the scene can vary from 0 to 23760 (elements cannot intersect). The live ...
0
votes
0answers
97 views

Unity3D - Upload a image from PC memory to WebGL app

I need user to upload his(her) avatar picture from PC to game How can I create a file dialog and upload a image to WebGL game?
-1
votes
1answer
128 views

WebGL - Open URL in new tab? [closed]

How to open URL in new tab for WebGL? Tried Application.OpenURL("url"). But it's opens a tab in same window Thanks
0
votes
0answers
69 views

Parse RestAPI in Unity WebGL build not working on Google Chrome

I am trying to integrate Parse in Unity Webgl build. As there is no specific SDK for WebGL provided by parse so for parse communication i am using RestAPI to Get the data from parse. As provided in ...
1
vote
0answers
71 views

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 ...
0
votes
1answer
2k views

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 ...
0
votes
1answer
381 views

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 ...
1
vote
1answer
73 views

WebGL color quantization

I'm making a WebGL game in a 90s DOS games style. I'm trying to use a shader which would quantize colors to get reduced colors look. I found this solution: Palette reduction to pre-defined palette, ...
3
votes
0answers
54 views

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, ...
2
votes
0answers
54 views

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 ...
3
votes
1answer
58 views

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 ...
1
vote
0answers
30 views

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 : ...
1
vote
1answer
158 views

Unity — custom shader behaves differently on WebGL deployment (correct) and editor view (incorrect)

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 ...
2
votes
0answers
77 views

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 ...
3
votes
2answers
137 views

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 ...
1
vote
0answers
22 views

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 ...
1
vote
1answer
121 views

White dots artifacts when applying borders to hex tiled geometry

I have a hexagon tiled geometry I created in Blender Which I then load in WebGL, using THREE.js library. Below is the loading code, I've cut the code of creating scene, lights, etc. I create ...
1
vote
1answer
493 views

Create a WebGL native plugin

I am trying to create a WebGL plugin and I read in the docs here: http://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html But I'm not sure I understand. I created a file in Assets/...
2
votes
1answer
73 views

WebGL - send part of texture to GPU

I have a matrix of pixels in RAM memory, e.g. 1000x1000 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. ...
0
votes
0answers
159 views

Error while running Unity WebGL build on MAMP localhost

I have built my game for WebGL platform and tried to run it on MAMP localhost. I am getting the following alert message in Google Chrome (Version 44.0.2403.125 (64-bit)) and in Safari (Version 8.0.3 (...
0
votes
0answers
57 views

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 ...
0
votes
0answers
75 views

How to properly use large texture that is not power of 2?

I'm making a 2D game, rendered using WebGL (using ANGLE, which means that on Windows DirectX is actually used). This is desktop-only game, but would be great to be compatible with integrated graphics ...
1
vote
2answers
541 views

Applicaton.ExternalEval(String script)

I was wondering, if Application.ExternalEval(String script); in Unity3D can return something. Like:String playerName = Application.ExternalEval("prompt("Please enter your name", "player1")"); Thank ...
5
votes
2answers
617 views

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 ...
1
vote
1answer
191 views

WebGL half float equivelant?

I'm trying to find a half float for the purposes of doing math in a fragment shader, not trying to have a half float texture. Is there an equivalent of the half float data type in WebGL? I know you ...
1
vote
2answers
92 views

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) ...
1
vote
2answers
242 views

Fragment shader compiling in webGL but not in OpenGL

I am programming in Haxe (language compiling to multiple platforms) and I have written some shaders. My fragment shader runs fine in html5, but when I try to compile for native (OS X and/or Neko, a ...
1
vote
1answer
287 views

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 ...
0
votes
0answers
42 views

Phaserjs, filters, save to image cache

I've tried to apply a Pixi filter to a image and save it to cache but the image doesn't get saved with the filter. colorMatrix = new PIXI.ColorMatrixFilter(); colorMatrix.matrix = [0,0.0,0.5,-0.2, 0,...
5
votes
2answers
1k views

How can I tell a fragment shader to not write a particular pixel?

In a WebGL I'd like to send a screen space quad through that gets processed by a fragment shader, but have the fragment shader only write out a pixel under certain conditions (say... that it was ...
3
votes
0answers
357 views

LibGDX's HTML project doesn't show anything in Browser

The question is self explanatory, when I run my demo-html project as a Web Application and I open Chrome with the provided link by eclipse, my browser doesn't show the image it is supposed to show in ...
1
vote
0answers
43 views

Array of script class references in inspector

I'm trying to remove the Reflection part of ones of my scripts so it works in WebGL, however I am having some trouble. Basically I need a way to store references to classes in an Inspector array so ...
0
votes
2answers
172 views

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 ...
1
vote
1answer
110 views

How are CSS and WebGL coordinates related? [closed]

I'd like to build a simple framework which rendering combines web page DOM elements with WebGL, such that they're manipulable in the same coordinate space. How does the plain CSS coordinate system ...