With three.js, I render earth with textures. I also add an emissive texture to add the city light. But I have an issue, even the light areas of earth emit the cities light. Exemple: It is possible to render the emissive texture lighting only in dark areas? I don’t find any ways. My texture is set like this: Answer I’ve
Tag: textures
Three.js Materials are reversed depending on direction of view
I am using Three.js to model a home. The idea is that I can show the home to an architect and discuss it further. The project is supposed to be walkable, so I put together it all on this site. If you visit the site to view the code, use arrow keys to move horizontally relative to the grass, use
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