Results 1 to 2 of 2

Thread: Collada FX: referecing surface array elements from samplers

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    Surface arrays are not supported directly. The NCName type used in the schema is intended to support only a single SID reference.

    You could add more references as <extra> data for the sampler if you are developing your own tools.

    If you want to submit a request for enhancement please visit the Khronos Bugzilla.

  2. #2
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    Hmm,
    I'm not so sure to just say no right away. I would bet that no implementations would support it but it wouldn't be hard pressed to make an argument that the COLLADA standard does (or at least should) support it.

    1. COLLADA Profile_CG newparam allows for arrays of any cg_param_type. This includes cg_surface. So you can have arrays of surfaces.

    2. COLLADA addressing syntax does allow for array access using the () like in your example.

    One problem is that the value of <source> is a xs:NCName, with an "SIDRef" type semantic associated with it, and not an xs:token, which other address syntax strings use (like animation target). But maybe that can be considered a bug. The <setparam> ref attribute is type cg_identifier which is a typedef for xs:token. And that was changed from xs:NCName because it was found that NCName didn't have lexical representation needed to support all of the syntax that you should be able to address (mainly access into structs, i.e. object.member)

    Now the only other problem is that currently cg_surface2D is just an fx_sample2D_common. In the common fx profile there are no arrays so having a simple xs:NCName for the <source> value is all that is needed. The reason that cg_sample2D is derived from the fx_sampler2D_common is to add additional profile_CG specific features when needed. In which case accessing into an array of surfaces could be one of them.

    Any thoughts?

    -Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •