Khronos Public Bugzilla
Bug 304 - Add texture array sampler types
Summary: Add texture array sampler types
Status: NEW
Alias: None
Product: COLLADA
Classification: Unclassified
Component: Schema (show other bugs)
Version: 1.5.0
Hardware: All All
: P3 enhancement
Target Milestone: ---
Assignee: Fabrice Robinet
QA Contact: COLLADA Work Group email alias
Depends on:
Reported: 2010-05-17 13:51 PDT by Markus Henschel
Modified: 2014-01-07 10:23 PST (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Markus Henschel 2010-05-17 13:51:43 PDT
OpenGL supports texture arrays for some time now. It is a core feature in OpenGL 3.0. A texture array is a special type of texture that contains several 2D image slices. The whole texture array has only one vector of samplering states and is treated as one single texture object.

Currently this cannot be expressed by ColladaFX. Collada allows arrays of samplers but this is not the right tool here. The Collada sampler types consist of an image to be sampled and sampler states. So in an array of sampler2D there would be individual sampler states and images for each element. Instead a single set of sampler states and a single image to be sampled is required.

It might be possible to do ugly things like creating an array of sampler2D and setting every element to the same sampler states and image. But what about setparam? Should they also be forced to set the images of all elements? Furthermore for texture arrays the image should define the size of the array not the sampler newparam.

I propose two alternative solutions:
Add sampler types:sampler1Darray, sampler2Darray, samplerCUBEarray, samplerRECTarray. 

Add an "is_array" attribute to existing sampler types that defaults to false.

Fortunately the image element that samplers reference already has everything needed to represent a texture array.