Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Multisampling Sample Positions > 4

  1. #1

    Multisampling Sample Positions > 4

    Hi,

    this is a basic question which requires some indepth knowledge.


    I want to query the sample positions of a 16x MSTexture. Simple enough:

    for(i : 16)
    glGetMultisamplefv(GL_SAMPLE_POSITION, i, (GLfloat*)&samplingPoints[i][0]);

    However, I notice that only the first 4 positions are non 0 and show the rotateted 2x2 pattern:

    0.375000, 0.125000
    0.875000, 0.375000
    0.125000, 0.625000
    0.625000, 0.875000


    What about the other 12.
    I have been told that msaa uses super sampling beyond that but is there some definitive documentation.
    Also, how will fragment coordinates behave?


    Edit:

    This is the sampling pattern in the fragment shader when using per sample shading, written to ssbo from shader:

    0 0.062500, 0.000000
    1 0.250000, 0.125000
    2 0.187500, 0.375000
    3 0.437500, 0.312500
    4 0.500000, 0.062500
    5 0.687500, 0.187500
    6 0.750000, 0.437500
    7 0.937500, 0.250000
    8 0.000000, 0.500000
    9 0.312500, 0.625000
    10 0.125000, 0.750000
    11 0.375000, 0.875000
    12 0.562500, 0.562500
    13 0.812500, 0.687500
    14 0.625000, 0.812500
    15 0.875000, 0.937500

    Why do they differ from the actual point query?

    Also: Which Sequence produces these coordinates?


    Best regards,
    Christoph
    Last edited by Christoph.LGDV; 03-22-2017 at 03:04 AM.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,476
    Is the correct framebuffer bound at the point that you perform the query? Have you checked the value of glGetIntegerv(GL_SAMPLES)?

  3. #3
    You are right of course.

    I have become so used to the new GL4.5 syntax using named calls, that I forgot to think.

    Interesting though, that such a call without bound framebuffer produces such half assed output.
    It was probably the default framebuffer sporting 2x2 ms.

    Ok, another question for the stupid folder.

Tags for this Thread

Posting Permissions

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