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 attempted to use the following code I found on Stack Overflow to export an OBJ from geometry in a Three.js scene. The geometry is being displaced by a GLSL shader so the displacement of vertices doesn't seem to export with the geometry. When I...
I am having a image that I am reading in server side and pushing to web browser via AJAX call. I have a requirement where I have to render them line by line using WebGL.  For Example : Image is 640X480 where 640 is width and 480 is height. Now the to...
I'm looking to parallelize some complex math, and webgl looks like the perfect way to do it. The problem is, you can only read 8 bit integers from textures. I would ideally like to get 32 bit numbers out of the texture. I had the idea of using th...
I have been piecing together online examples to make a Mandelbrot Set fragment shader. The vertex shader does basically nothing, it assigns gl_Position and the fragment shader does some math to calculate the image.  However, I have a number of #defin...
I have seen the following question where someone asked how to remove shaders from html: WebGL - is there an alternative to embedding shaders in HTML?  There are elaborate workarounds to load in a file containing the shader suggested in the answers to...
UPDATE 2  I've implemented custom attributes with THREE.js, influences come with each pass in the vertex shader aligned with position attribute, the best solution with minimal code.     I will add the example later   UPDATE 1  This method sets al...
Context  I'm trying to draw Bezier curves in a canvas. I achieved to draw quadratic and cubic curves from within the shader, but I did have a uniform variable for each and every control point so far.  So, I click on my canvas, add points and when...
I tried to create the snow effect like the one on the bottom page of this link http://blog.edankwan.com/post/my-first-christmas-experiment. Everything else works fine But just can't make the motion blur effect work. Any ideas?   the texture sprit...
I've been trying to make a structure that will contain all the lights of my WebGL app, and I'm having troubles setting up it's values from JS. The structure is as follows:   struct Light {     vec4 position;     vec4 ambient;     vec4 dif...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.