I'm building a boardgame in WebGL. The board can be rotated/zoomed. I need a way to translate a click on the canvas element (x,y) into the relevant point in 3D space (x, y, z). The ultimate result is that I want to know the (x, y, z) coordinate...
Is it possible to lay multiple textures on top of each other on the same face in Three.js so that the alpha blending is done GPU accelerated in webGL?  The textures are (or should be) applied to the same face so that the bottom texture (texture 1)...
I noticed that THREE.js uses shaders internally to create core material "e.g. MeshLambertMaterial", So I decided to copy the lambert shader from Three.js code into a new shader and build on it.  This is the code I got (Copied faithfully fro...
I am trying to convert the canvas element on this page to a png using the following snippet (e.g. enter in JavaScript console):  (function convertCanvasToImage(canvas) {   var image = new Image();   image.src = canvas.toDataURL("image/png");...
Is there some JavaScript event fired when user enables full screen in Chrome or FireFox?   I have WebGL application with canvas width and height set to a certain size and I would like to resize that among other things when user enables full screen. I...
I am under a situation that i have two canvas, and i want to display the same object in both canvas (in fact i have to display different objects in each canvas, but i want to start by showing same object in both), but i am not able to do this,    cou...
In the learningwebgl tutorial1 I've found an interesting line in the fragment shader.  precision mediump float;   I've found an article about it here, but I still can't understand what does it mean?  And if I remove this line, nothing cha...
For educational purposes I need to compare the performance of WebGL with OpenGL. I have two equivalent programs written in WebGL and OpenGL, now I need to take the frame rate of them and compare them.    In Javascript I use requestAnimationFrame to a...
I'm playing around with Three.js and WebGL and can't quite get the controls the way I want. I chose to try to "roll my own" controls since Three.js's FirstPersonControls do not use pointer lock.  Anyway, I took most of my code fro...
I have a problem with image rendering in WebGL: I have a canva, with a quad that takes the whole canvas, and a texture which is supposed to be mapped onto the whole quad (I have set the correct texture coordinates).  The image is a Uint8array contain...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.