Questions tagged [uniform-buffer-object]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
52 views

Model matrix for batch renderer as uniform or vertex attribute?

Where should the model matrix be uploaded to the GPU in a batch renderer? All the tutorials I've ever seen use a uniform for this, but that's not with batch rendering. Since the uniform is only ...
user avatar
  • 101
0 votes
1 answer
71 views

Level of detail passed from vertex shader to fragment shader

I am looking at a sample code from a respected source and the mipmap level-of-detail parameter (float) is passed to the vertex shader as a uniform which then passes to the fragment shader without ...
user avatar
0 votes
1 answer
57 views

Force int array to compact memory

I have following structure which i use as an uniform buffer object. ...
user avatar
1 vote
0 answers
130 views

Veldrid: Only execute fragment shader

Having an HLSL shader like this: ...
user avatar
  • 121
3 votes
1 answer
1k views

Shader storage buffer indexing by 4 bytes instead of 3?

I am trying to send rendering information for an instancing rendering using shader buffer objects. My current problem is that I have 2 shader buffer objects, one which works just fine, and another ...
user avatar
  • 1,449
8 votes
2 answers
1k views

What is a good approach for handling uniforms in modern OpenGL?

I'm creating a renderer using modern OpenGL (3.1 and up) and now I'm trying to create an efficient but flexible way of handling uniforms. I've been reading up on uniform buffer objects and on what a '...
user avatar
  • 103
1 vote
1 answer
5k views

OpenGL ES 3 - Uniform buffer object with float array

I'm trying to load an array of float to a fragment shader using a uniform buffer object, but it doesn't work. In the fragment shader I declared the following uniform block: ...
user avatar
3 votes
1 answer
2k views

Uniform Buffers: What is quicker?

So I want to render a buttload of quads by using a single 4 point vertex array and change the position of the quad. What is quicker: Using glBufferSubData to ...
user avatar
  • 273
10 votes
1 answer
269 views

Do the alignement and declaration order of uniforms matter?

In the section 6.4 Constant Buffers of the book Practical Rendering & Computation with Direct3D 11 (pages 325, 326) it is mentioned: By default, the HLSL compiler will attempt to align ...
user avatar