PDA

View Full Version : Missing texture3D



pion
01-07-2011, 07:32 AM
The OpenGL Shading Language version 1.28 http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf has the following:


// Use the texture coordinate coord to do a texture lookup in the 3D texture currently bound to sampler.
vec4 texture3D (sampler3D sampler, vec3 coord [, float bias] )
My understanding is that WebGL implements The OpenGL Shading Language version 1.0 http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf which does not support texture3D.

Is it possible to implement texture3D on WebGL?

Thanks in advance for your help.

SteveBaker
01-07-2011, 07:45 AM
It's not OpenGL ES version 1.0 - it's version 2.0 - so it'll run on (for example) an iPhone 4 - but not on iPhone 3. 2.0 includes shaders - 1.0 doesn't.

One of the fundamental design decisions in Web3D was to base it on OpenGL ES 2.0 in order that it can run on things like cellphones and tablet computers. Anything that's not in ES2 has to be added as an extension - and things like that are pretty much guaranteed not to exist on at least some computers.

So right now, the answer is "No".

giles
01-12-2011, 01:43 PM
A bit of clarification to the above: OpenGL ES 2.0 actually uses version 1.0.17 of the shader language. I assume this was done entirely to confuse people...