Results 1 to 2 of 2

Thread: sampler3D and profile_COMMON. Schema broken?

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Location
    Netherlands
    Posts
    8

    sampler3D and profile_COMMON. Schema broken?

    I ran across a weird issue with 3D textures in COLLADA 1.4.1. It seems to be related to 1.5 as well. The question is: How do I specify 3D textures in COLLADA using profile_COMMON?
    According to the spec document, profile COMMON supports sampler3D, and sampler3D can be a child of newparam similar to sampler2D. However, a newparam inside profile_COMMON does not have a sampler3D attribute. Why is this so? It seems that the 1.4.1 schema is broken.

    A workaround could be to specify the sampler outside the profile_COMMON block but inside the effect block, since then newparam can have a fx_basic_type_common attribute which in turn can have a sampler3D attribute. At least, according to the schema, since the spec documention does not mention the fx_basic_type_common attribute.

    How should I use sampler3D?
    Gino van den Bergen
    www.dtecta.com

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: sampler3D and profile_COMMON. Schema broken?

    Quote Originally Posted by gino
    I ran across a weird issue with 3D textures in COLLADA 1.4.1. It seems to be related to 1.5 as well. The question is: How do I specify 3D textures in COLLADA using profile_COMMON?
    The profile_COMMON only supports 2D texturing within its scope.
    Quote Originally Posted by gino
    According to the spec document, profile COMMON supports sampler3D, and sampler3D can be a child of newparam similar to sampler2D. However, a newparam inside profile_COMMON does not have a sampler3D attribute. Why is this so? It seems that the 1.4.1 schema is broken.
    You have found a spec error. The schema is the formal definition.
    Quote Originally Posted by gino
    A workaround could be to specify the sampler outside the profile_COMMON block but inside the effect block, since then newparam can have a fx_basic_type_common attribute which in turn can have a sampler3D attribute. At least, according to the schema, since the spec documention does not mention the fx_basic_type_common attribute.
    It's true that parameters at effect scope are visible across all profiles (i.e. multi-profile effects). Being visible does not mean they are usable in all profiles. In profile COMMON, the use of <param> is supposed to be a <float4> (i.e. a color).
    Quote Originally Posted by gino
    How should I use sampler3D?
    Either use a profile that supports it like GLSL or Cg, or add an extension to your application code that supports it in COMMON (e.g. using <effect><newparam> and <param>).

Posting Permissions

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