Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
176 views

I'm trying to write a compute shader in GLSL with OpenGL, GLFW, GLEW, and GLM. The problem is that the compute shader either isn't running or isn't modifying any buffers. I have the latest NVIDIA 4060 ...
kronosta's user avatar
0 votes
1 answer
137 views

I'm having a problem with the size of my StorageBuffer, I currently have 4GB available on my GPU but I seem to be limited to a maximum size of 1GB. I went to check the vulkan specifications of my GPU ...
sam fr's user avatar
  • 1
0 votes
0 answers
254 views

This is the fragment shader code which is including struct and buffer data: struct Light { float range; vec3 position; vec3 color; }; layout (std430) buffer LocalLights { uint ...
PpuRal's user avatar
  • 1
0 votes
0 answers
46 views

This is fragment shader which is using SSBO struct Light { float range; vec4 position; vec4 color; }; layout (std430) buffer LocalLights { uint activeLightCount; Light light[]; }...
PpuRal's user avatar
  • 1
2 votes
2 answers
238 views

My intersection shader always reads just zeroes from the SSBO I have. I tried using debugPrintEXT, but it wouldn't print out from within the intersection shader. However, when I try to output any ...
VP.'s user avatar
  • 17k
2 votes
0 answers
489 views

I'm experimenting with Vulkan rendering, and noticed that we can render using StorageBuffer + gl_VertexIndex instead of VertexBuffer. I've seen this in Metal API tutorials. There are any benefits of ...
Maksym Pasichnyk's user avatar
0 votes
1 answer
365 views

If I have a shader storage block defined in GLSL like this: buffer test_block { type1 var1; type2 var2; type3 var3; }; How to get the offset of one of the variable in this block? We know ...
Time-Coder's user avatar
0 votes
1 answer
1k views

I have a large Storage Buffer of ~4.6MB I am sending via compute buffer and then retrieving at the host at the end of the render loop. I was hoping someone could provide guidance on a possible optimal ...
phoenixinwater's user avatar
0 votes
0 answers
712 views

I'm writing a compute shader that will output some unknown amount (there is a theoretical upper bound, but it is huge, compared to expected values) of data into a storage buffer. I have found a way to ...
McLP's user avatar
  • 140
1 vote
1 answer
513 views

When I call GetBufferSubData with my Shader Storage Buffer Object there is typically a 4ms delay. Is it possible for my application to do work during that time? // start GetBufferSubData // do client/...
Leon Frickenschmidt's user avatar
0 votes
1 answer
277 views

I'm trying to learn moderngl for Python and I want to know if there is a way to make certain that when I read/write to a buffer (uniform or shader storage), the endianness agrees between guest and ...
user2649681's user avatar
2 votes
0 answers
1k views

I have an OpenGL compute shader that generates an undefined number of vertices and stores them in a shader storage buffer (SSB). The SSB capacity is big enough so that the compute shader never ...
Krafpy's user avatar
  • 356
0 votes
0 answers
531 views

Im doing trillinear interpolation using Shader Storage Buffer Object. So i access my ssbo in fragment shader like this: layout(std430, binding = 0) buffer ColorSSBO { int value[]; }; int c000 = value[...
Timur Nizamiev's user avatar
0 votes
1 answer
115 views

I am trying to load integer array in parallel, but i get an error: int[][] colors; ... IntStream.range(0, colors.length).parallel().forEach(i -> { GL15.glBufferSubData(GL43....
Timur Nizamiev's user avatar
7 votes
1 answer
1k views

I've been having some issues with transfering a GPU buffer into CPU for performing sorting operations. The buffer is a GL_SHADER_STORAGE_BUFFER composed of 300.000 float values. The transfer operation ...
jpaguerre's user avatar
  • 1,150
0 votes
1 answer
226 views

I've been trying to initialize an SSBO and pass it to a a compute shader. int ssbo = glGenBuffers(); FloatBuffer buff = BufferUtils.createFloatBuffer(4); buff.put(0.1f); buff.put(0.4f); buff.put(1....
Boris Vassilev's user avatar
0 votes
0 answers
43 views

I seem to have nondeterministic data in my Shader Storage Buffer. I used apitrace to inspect the state machine and noticed the following sequence of function calls in the trace: glBindBuffer (...
spraff's user avatar
  • 33.7k
4 votes
1 answer
2k views

I just tried to do this C++ struct PointLight { glm::vec4 position; glm::vec4 colour; }; std::vector <PointLight> lights_array; GLSL 320 ES: layout (std140) struct PointLight { ...
spraff's user avatar
  • 33.7k
4 votes
1 answer
11k views

Let's say I have a dynamic number of "balls" which I want to access in my OpenGL shaders. In C++ the data might be like this: struct Ball { glm::vec3 position; glm:vec3 colour; float size;...
spraff's user avatar
  • 33.7k
1 vote
1 answer
1k views

I've got code that looks like this: uint ssboId; glGenBuffers(1, &ssboId); glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssboId); //initialize glBufferData(GL_SHADER_STORAGE_BUFFER, size, 0, ...
Mr. Smith's user avatar
  • 4,576
4 votes
1 answer
1k views

I'm not sure which structure layout is most suited for my application: shared, packed,std140, std430. I'm not asking for an explanation of each, that information is easy to find, it's just hard to ...
Mr. Smith's user avatar
  • 4,576
3 votes
1 answer
2k views

What layout and binding do i have to do to make a (working) shader storage buffer readable in a second shader program? I set up and populated a SSBO which i bound successfully and used in a geometry ...
prox's user avatar
  • 31
0 votes
1 answer
2k views

In OpenGL ES Shading Language, the shader storage buffer object (SSBO) can be decorated with qualifier readonly or writeonly. Section 4.9 (Memory Access Qualifiers) of OpenGL ES Shading Language ...
dudu's user avatar
  • 859
1 vote
1 answer
2k views

From skimming through the OpenGL documentation I kinda assumed that MAX_SHADER_STORAGE_BLOCK_SIZE is the actual limit on the size an SSBO might have. On my GPU this value is reported as 128 MB. ...
soulsource's user avatar
3 votes
1 answer
2k views

I am trying to get a variable of type sampler2D into my shaders without using an uniform variable. Instead, I want to hand it over using a Shader Storage Buffer Object (SSBO). What type of variable ...
dagute's user avatar
  • 103
0 votes
0 answers
184 views

I have some question on multiple buffering in OpenGL. For example, I have a program. It does following things: do a depth pre-pass, and write some information on the shader storage buffer. use the ...
Charlie's user avatar
  • 23
0 votes
1 answer
233 views

Creating a buffer with pow(2, 24) and a local_size_x = 64 for the layout input qualifier will return WorkGroupID = 262143 which is all fine due to pow(2,24) / 64 - 1, it is zero indexed. However if ...
user avatar
2 votes
1 answer
1k views

Both my fragment and vertex shaders contain the following two guys: struct Light { mat4 view; mat4 proj; vec4 fragPos; }; layout (std430, binding = 0) buffer Lights { Light lights[]; }; My ...
seenmycorpseanywhere's user avatar
6 votes
0 answers
4k views

I'm trying my hand at shader storage buffer objects (aka Buffer Blocks) and there are a couple of things I don't fully grasp. What I'm trying to do is to store the (simplified) data of an ...
seenmycorpseanywhere's user avatar
1 vote
1 answer
474 views

I have encountered a weird problem: I have a fragment shader containing several uniform variables (mat4, vec4), a single sampler2D and a gigantic SSBO (1GB-2GB). For each type of variables, it does ...
user3677630's user avatar
0 votes
1 answer
2k views

Once more I have a problem with my compute shader... I would like to pass a structure containing a pointer into a compute shader. This is my structure example: struct couleurStruct { float r; ...
bRiocHe's user avatar
  • 37
0 votes
1 answer
3k views

Writing a simple compute shader in OpenGL to understand how it works, I can't manage to obtain the wanted result. I want to pass to my compute shader an array of structures colourStruct to color an ...
bRiocHe's user avatar
  • 37
3 votes
1 answer
4k views

I'm fairly new to opengl and I found myself in situation where I need to get data from compute shader but as I miss some critical knowledge I can't get it to work. So I came here, so that maybe you ...
alpacacapla's user avatar
1 vote
1 answer
217 views

I created a shader storage buffer object to give information to my vertex shader. It is bound to a buffer containing a single structure. But there is a problem. The data I keep in this structure is ...
Talesseed's user avatar
  • 191
1 vote
1 answer
244 views

I have bound the shader storage buffer to the shader storage block like so GLuint index = glGetProgramResourceIndex(myprogram, GL_SHADER_STORAGE_BLOCK, name); glShaderStorageBlockBinding(myprogram, ...
mskr's user avatar
  • 405
6 votes
0 answers
2k views

I am interested in passing a variable length array (attached SSBO) to a function, i.e.: layout(std430) buffer ssbo { type buffer[]; }; void func(buffer) { buffer[...] } func(buffer); EDIT: ...
unexpectedvalue's user avatar
4 votes
1 answer
570 views

Suppose that I have one shader storage buffer and want to have several views into it, e.g. like this: layout(std430,binding=0) buffer FloatView { float floats[]; }; layout(std430,binding=0) buffer ...
Nobody moving away from SE's user avatar