Skip to content
Advertisement

Tag: textures

How do I Get Copy of Webgl Texture

I have a webgl texture and I store this texture in a javascript variable I want to keep a copy of this texture (texture1) in another variable, not instance. For example for javascript arrays, thanks to the slice function, we can keep a copy of arrays in a variable. How do I do this for webgl textures? Answer There is

Multiple passes render to separate textures

I am using the render to texture method for creating a multi shader program. And for various reasons. I need to first render a model to a texture with one shader program. Then render it again with a different shader program into a different texture. Then I have one final post processing shader that combines the results of the two.

Three.js WebGL texture shows up black on plane

So basically, I have a scene in WebGL with 2 planes. One of them has a transparent texture on it and it shows up fine. The other is supposed to have a high res, non-transparent texture loaded up on it and it is used as a background. I can’t figure out why the background plane isn’t working, since I directly

Advertisement