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...
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 have the need to orientate an instance of THREE.Mesh to always face the camera. I know I could just use the [THREE.Mesh].lookAt() method, but I'm trying to work on my GLSL chops a bit more and want to be able to do this in a vertex shader.  I&#...
I'm working on a small multiplayer game which has a single skinned player mesh with many players using it. Some Background: I've tried loading via maya and blender collada export. Both seem to reference some form of animation data but I could...
Is there any way to let the browser returns the opengl version string?  I know that opengl is not executed by the browser, this is why in the code, the shaders are written as string to not make javascript syntax errors,  So, if the browser can interr...
Does webGL contain push/popMatrix? and if not, how would I go about recreating them?...
I learn WebGL step by step via this book. I try to draw three points through using of the buffer (gl.ARRAY_BUFFER) instead of cycle (as I did the same earlier in other samples of the book).     var u_FragColor = gl.getUniformLocation(gl.program, '...
I'm working to port a native OpenGL application to WebGL by using the three.js framework. I'm stumbling on the implementation of spherical impostors.  Spherical Impostors are basically quads (or two triangles) that are rendered in a way that...
I am trying to render textured particles and i have the problem. Transparent pixels of texture doing a weird thing with render. Looks like particles that are behing nearest (to camera) particles are not rendering at all. But not always, some of them...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.