mrdoob/three.js — Issue #1235: DataTexture problem
Author: chandlerprall
Created: 2012-02-02 08:17:11+00:00
State: open

Unfortunately it would be difficult to share relevant code for this. I set up a simple test case for using a `DataTexture` and that went very well and was straight forward. I'm trying to integrate it into my current project but it's not cooperating.

@alteredq do you recognize any of these issues:

* Attempting to call `texture2D` on the texture uniform results in `Uncaught TypeError: Type error` on this line:
`_gl.texImage2D( _gl.TEXTURE_2D, 0, _gl.RGBA, _gl.RGBA, _gl.UNSIGNED_BYTE, texture.image );`
Texture is `undefined` at that point of code, which is why it skips the `if ( instanceof THREE.DataTexture )` check
* WebGL inspector isn't showing anything related to the texture either in `Textures` panel or in the shader program.
* Inspecting `material.uniforms` to compare the data texture against a normal texture I see a discrepancy in that `uniformsList.0[0].texture` is a `Texture` while `uniformsList.1[0].texture` is an `Object`, not a `DataTexture`. However, all of its values appear to be present & correct.