All Questions
65
questions
0
votes
1
answer
130
views
webgl: geometry texture missing after gl.bindTexture
there is a textured cube in my scene, and it renders well untill i draw a quad, then cube tuxture is gone, here is the render flow:
// draw the texture cube
gl.render(scene, camera);
// draw a ...
0
votes
0
answers
770
views
Add normalMap to ShaderMaterial
I am trying to add multiple textures on the same object in Three.js. I have a 3d T-shirt and the following elements as .png for the T-shirt textures:
The front, back and sleeves of the T-shirt:
The ...
1
vote
1
answer
114
views
Apply texture to half of quad
I am working on a scene in threejs that renders an image of a cat.
Specifically, I'd like to render a rectangle, and I'd like for the right half of that rectangle to be red, and for the left half of ...
0
votes
1
answer
308
views
Split up R, G and B channels of texture – apply linear filtering to a subset of them in Three.js/WebGL/Shaders
I am working with a height texture that is retrieved from a server. It encodes the overall height value per pixel within the RGB channels. To get a height value per pixel, the R channel is multiplied ...
3
votes
0
answers
243
views
How to use compressedTexSubImage2D with threejs Texture
I try to make a TextureAtlas for threejs using compressedTexture but I cant find a way to get the correct format/internal format
The error I get is : glCompressedTexSubImage2D: format does not match ...
3
votes
0
answers
757
views
Error: GL ERROR :GL_INVALID_OPERATION : glTexImage2D
We are developing a kind of 3D graph. We are using Angular with Three-full NPM (https://github.com/Itee/three-full). We are implementing the Nodes as particles and we are drawing them with shaders.
...
0
votes
1
answer
1k
views
How can I pass a three.js texture as "WebGLTexture" to WEBGL code?
I'm trying to pass a three.js texture to gl.texSubImage WEBGL function and I get the following error:
On Chrome:
On Firefox:
The code follows bellow - the destination texture2 is passed to gl....
0
votes
1
answer
560
views
Applying texture to 3D-models in WebGL, using external links [closed]
I have just learnt how to apply texture to my 3D-models in WebGL using .mtl files (and .obj files). Applying texture works great when the image is saved on my computer. Here is an example of what my ....
1
vote
1
answer
2k
views
Storing data as a texture for use in Vertex Shader for Instanced Geometry (THREE JS / GLSL)
I'm using a THREE.InstancedBufferGeometry, and I wish to access data in the Vertex Shader, encoded into a Texture.
What I want to do, is create a Data Texture with one pixel per instance, which will ...
8
votes
1
answer
7k
views
THREE.js How to increase texture quality
What are the possible and good ways/best practices/etc to improve texture quality in THREE.js?
I have a scene where I have planes(cards) with 512x512px textures. How it looks you can see on images ...
1
vote
0
answers
254
views
WebGL/THREE.js Reading floating point textures
I was trying to figure out how to read the data from a floating point texture using three.js and I came across this post: https://github.com/mrdoob/three.js/issues/9513
I am able to successfully ...
1
vote
0
answers
240
views
Three js depth buffer, power of 2 textures?
I am rendering the depthbuffer of my scene to a texture, so that I can use it in a later pass for position and normal reconstruction. My question is whether the fact that the buffer is not power of 2 ...
0
votes
1
answer
116
views
Incorrect reading from DataTextures in shader
I have a program that works great when my POT DataTextures are 1:1 (width:height) in their texel dimensions, however when they are 2:1 or 1:2 in texel dimensions it appears that the texels are being ...
6
votes
1
answer
472
views
Weird behavior if DataTextures are not square (1:1)
I have a pair of shader programs where everything works great if my DataTextures are square (1:1), but if one or both are 2:1 (width:height) ratio the behavior gets messed up. I can extend each of the ...
0
votes
1
answer
2k
views
WebGL crashes when generating a texture - OutOfMemory
I currently use Three.js in a bigger web project.
Everything works fine and there is no issue with rendering and so on. The only problem I am running into is kind of specific.
In a part of my project,...