Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: sleap

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    405

    Personally I find thinking about planes as a...

    Personally I find thinking about planes as a point&normal vector representation much easier than plane equations. Transform both (normalmat*normal, modelview*vec4(point,1)) into eye space and the...
  2. Just what I'm after. Thanks! I guess I'll have...

    Just what I'm after. Thanks!

    I guess I'll have to experiment with creating many texture handles for each layer or call glTextureView many times.
  3. Replies
    7
    Views
    479

    What about rendering depth textures, just like...

    What about rendering depth textures, just like you would a shadow map. Then (as others have discussed) draw points for every texel in the depth texture, sampling depth and projecting them back into...
  4. Binding a single TEXTURE_2D_ARRAY layer to a sampler2D

    With glFramebufferTextureLayer you can attach a single layer of a texture array to a framebuffer. In the same way I'd like to be able to bind a single layer to a sampler2D in a shader. This would...
  5. A call to get dimensions of image units in GLSL, just like textureSize

    Not exactly a big suggestion but here goes...

    textureSize(sampler, level) is a handy function to get texture dimensions in a shader without having to pass them in by hand as uniforms.


    It'd be...
  6. Can anyone think of a nice way to tightly pack...

    Can anyone think of a nice way to tightly pack vec2 data?

    The trouble is indexing elements .xy and .zw. Ideally I'd like to be able to have something like this...



    float arrayUnpacked[N];...
  7. ATI: procedural drawing without any vertex data

    I'm trying to draw (glDrawArrays) without binding any vertex data, generating everything using glVertex_ID. This works absolutely fine on Nvidia cards, but not with my ATI 5850s. Nothing is drawn...
  8. Finding the GLSL image unit layout information from the application

    A number of times I've mistakenly tried to bind a GL_RG32F texture buffer to a layout(rgba32f) imageBuffer.

    This mismatch in the image unit format silently fails and all reads result in zeroes....
  9. Signed int addressing of image units limits to 2gb

    I can call glBufferData and afaik allocate 8gb of memory without an error (though the card only has 6).
    However there's not much point creating 2gb or more since the index argument for imageLoad is...
  10. Replies
    5
    Views
    3,230

    You might have already seen it, but there's...

    You might have already seen it, but there's similar locking code here: http://blog.icare3d.org/2010/07/opengl-40-abuffer-v20-linked-lists-of.html
    It's a few years old but it might be worth a look.
    ...
  11. A short update... both divide and modulus op are...

    A short update... both divide and modulus op are not cheap. It's quite a bit faster to use bitwise ops:

    myArray[i>>2][i&3]

    Still not optimal, and I'm guessing part of the slowdown is related to...
  12. GLSL pads int arrays to 16 bytes, taking 4 times local memory

    I have an NVIDIA GTX 670, linux driver 319.49. In my shader I declare an array of integers...

    int myArray[512];

    When I use glGetProgramBinary and have a look at Nvidia's handy plaintext output...
  13. Replies
    2
    Views
    2,136

    Writing directly to the stencil buffer

    Instead of the standard increment, replace etc operations on the stencil buffer I'd like to be able to write arbitrary values directly from a shader. I don't mind of this is during typical rendering...
  14. Replies
    2
    Views
    2,264

    Stab in the dark here but have you installed the...

    Stab in the dark here but have you installed the latest video drivers?


    It might also be worth having a quick look at the DLLs your app uses on the other machine - search for "windows dependency...
  15. Running the compute shader seems to give a...

    Running the compute shader seems to give a performance boost to the OIT shader, if the OIT shader uses a large array. If the OIT shader uses a small array (<32) the performance actually drops. In...
  16. Running a compute shader with a large array makes other shaders with arrays faster.

    I've stumbled upon some strange behaviour when playing with compute shaders. I have a basic OIT implementation using linked lists (although my guess is any application which uses a fairly large local...
  17. Replies
    3
    Views
    1,304

    Nice question. I'm quite in favour of injecting...

    Nice question. I'm quite in favour of injecting #define values and creating permutations of shaders (within reason of course). However, I haven't ever noticed much performance difference doing...
  18. Thanks for the response. I'm aware of the two...

    Thanks for the response. I'm aware of the two formats. They both work for me but I've just chosen size4x32 as it works on my ATI card.

    Your declaration still causes a crash with my 310.19 drivers.
  19. NVIDIA 310.* crashes when compiling GLSL using "restrict" keyword on image unit

    title says it all.

    declare any image unit from the image load store extension will cause a crash on the call to compile the shader, eg:
    layout(size4x32) uniform imageBuffer restrict data;
    ...
  20. Replies
    4
    Views
    2,040

    Re: slow local arrays in GLSL

    Thank you both for your replies.

    Working on a single cell was to stop the compiler optimizing the array out, so I could confirm the array size was my problem, and not the operations I was...
  21. Replies
    4
    Views
    2,040

    slow local arrays in GLSL

    Hi,
    I'm surprised at the cost of declaring arrays in GLSL programs.
    The array doesn't need to be initialized, all I do is write to a random element and read from the same one (so the array can't be...
  22. Replies
    1
    Views
    1,807

    GLSL while (someFunction) ... infinite loop

    Hi,
    I've had this issue a few times now. I'm trying to create a generator style function for iteration. A basic example would be:

    bool iter(inout int i)
    {
    if (++i >= 10)
    return...
  23. Replies
    1
    Views
    636

    uniform structs with image buffers

    It seems samplers, image buffers and bindless graphics pointers cannot be placed in GLSL structs. This would be quite useful in the following situation where multiple complex structures need to be...
  24. Replies
    2
    Views
    2,597

    Re: GLSL struct packing / texture buffers

    Thanks for the reply! Indeed so - I am using nvidia's GL_NV_shader_buffer_load. I guess I'm allocating memory as a texture buffer and then getting a pointer to that memory with nvidia's extension.
    ...
  25. Replies
    2
    Views
    2,597

    GLSL struct packing / texture buffers

    Hi,
    There seems to be very little information on this or maybe I'm looking in the wrong places. It's now possible to declare a struct in GLSL and an array of that type. This array can map to global...
Results 1 to 25 of 25