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...
So to implement a tilemap using Threejs and Brandon Jone's tilemap method (found here) I am using a THREE.Plane geometry for each layer, and painting the face with the following custom shaders:  Vertex Shader:  var tilemapVS = [     "varying...
I'm trying to write a fragment-shader that functions as a chroma-key filter for a specific color (for example make all pixels with a specific green transparent).  The shader I'm writing is for use in WebGL trough PIXI.js.  JSFiddle: https://j...
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've already done some projects with c++ and OpenGL, now I'm creating a simple project with html5 and WebGL.   The problem is, after I rotate the camera, the movement is always along the default axes and not along the rotated ones. For exampl...
I've been working off this example http://meetar.github.io/threejs-shader-demos/llama.html that uses an animated gif as a displacement map. However, it uses THREE.js r58 and I'm using THREE.js r85 and the following code from the example doesn...
So I want to have 2 input feilds, one editable.  I need some script that would turn such shader text input:      #ifdef GL_ES     precision highp float;     #endif      varying vec4 v_color;      void main (void)     {       gl_FragColor = v_color;...
To start off, I couldn't really find any appropriate community to post this question in so I picked this one. I was wondering how the audio shaders of the popular webGL based shader tool worked, because when, even though I had obviously heard of...
I am currently using the MeshPhongMaterial provided by Three.js to create a simple scene with basic water. I would like for the water material to have the Hard Light blending mode that can be found in applications such as Photoshop. How can I achieve...
I've just finished porting of my first cloth simulation from opengl to webgl using three.js (can be seen here).  The thing is it looks a bit dull, and I want to add (as i hope i remember correctly from my computer graphics classes) ambient occlus...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.