Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: ATi: apply 2 or more depth textures simultaneously?

  1. #1
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    105

    ATi: apply 2 or more depth textures simultaneously?

    going through arb_shadow specs i can see no restriction on using 2 or more depth compare stages at the same time
    in fact, this works fine on nv cards (tested on a 5900) but fails on my mobility 9700 (6.14.10.6458 drivers)
    actually if there's already 1 depth compare (say in tex unit 0) the card behaves as it is expecting a rgb texture in the next stage
    as far as you know, is there any way to get this to work on ati hardware?

    thanks for any help you may provide

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: ATi: apply 2 or more depth textures simultaneously?

    Your 9700 probably runs out of fragment program opcodes. Because the hardware doesn't directly implement ARB_shadow, it must expand shadow accesses into fragment program ops. Since PCF takes up quite a few opcodes, doing two or more of them probably blows the 32 opcode limitation of the hardware.

  3. #3
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    105

    Re: ATi: apply 2 or more depth textures simultaneously?

    Originally posted by Korval:
    Your 9700 probably runs out of fragment program opcodes. Because the hardware doesn't directly implement ARB_shadow, it must expand shadow accesses into fragment program ops. Since PCF takes up quite a few opcodes, doing two or more of them probably blows the 32 opcode limitation of the hardware.
    First of all thanks for your answer.
    That said I'm a bit confused, I always thought ati cards could not do PCF, I mean I know for sure there is no hardware support for bilinear, isnt the depth comparison done in some sort of single-fetch-from-depth-texture fragment program?!?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: ATi: apply 2 or more depth textures simultaneously?

    That said I'm a bit confused, I always thought ati cards could not do PCF, I mean I know for sure there is no hardware support for bilinear, isnt the depth comparison done in some sort of single-fetch-from-depth-texture fragment program?!?
    The ARB_shadow extension specifies what a compliant implementation must do to be compliant. If you expose ARB_shadow, you have to do PCF. To emulate it, they do 4 samples and manually compute the results. So that's 4 texture accesses (from the same texture. The maximum allowed for the same texture), plus having to do conditional operations and combining the results of that together. Depending on how their hardware works, it may not be possible to do this on 2 separate textures.

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Posts
    748

    Re: ATi: apply 2 or more depth textures simultaneously?

    I'm not aware of any PCF on ATI cards, and i work on shadow maps every day with them. Actually PCF is not even mentionned in the specification of ARB_shadow, unless i overlooked something.

    Y.

  6. #6
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    105

    Re: ATi: apply 2 or more depth textures simultaneously?

    agreed with ysaneya, actually the specs are saying that shadow maps filtering is not strictly required and is implementation dependent, they dont state any rule in particular

    anyone from ati to confirm this limitation of a single depth compare?

  7. #7
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    105

    Re: ATi: apply 2 or more depth textures simultaneously?

    By the way, Ysaneya, should you own an ati card, have you ever experienced the same trouble?

  8. #8
    Intern Contributor spasi's Avatar
    Join Date
    Feb 2004
    Location
    Greece
    Posts
    67

    Re: ATi: apply 2 or more depth textures simultaneously?

    If you're using GLSL for this (sampler2DShadow), my experience with ATIs is full of weird problems, even with a single depth map. And I mean *really weird* results, with any driver.

    As for running out of opcodes, it shouldn't be problem (given a good implementation) because I've seen an ATI soft shadow demo with 16 samples/compares (implemented in a low-level d3d shader though).
    spasi
    zDimensions

  9. #9
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    105

    Re: ATi: apply 2 or more depth textures simultaneously?

    i cant go for glsl, i am using plain arb_shadow extensions
    how can it be this restriction is not documented anywhere?

  10. #10
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: ATi: apply 2 or more depth textures simultaneously?

    There shouldn't be any such limitation. We're probably looking at a bug here. In fact, I'm currently investigating an ARB_shadow bug that may be related to this. Do you guys see any difference between different driver revisions, say between Cat 4.10 to 4.12?

Posting Permissions

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