Skip to main content

Questions tagged [uniform-buffer-object]

The tag has no usage guidance.

0 votes
2 answers
444 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 ...
junglie85's user avatar
  • 125
0 votes
1 answer
108 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 ...
Vectorizer's user avatar
0 votes
1 answer
119 views

Force int array to compact memory

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

Veldrid: Only execute fragment shader

Having an HLSL shader like this: ...
Tau's 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 ...
Makogan's user avatar
  • 1,736
8 votes
2 answers
2k 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 '...
PhilipMR's user avatar
  • 103
1 vote
1 answer
6k 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: ...
Fabrizio Duroni's user avatar
4 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 ...
salbeira's user avatar
  • 303
11 votes
1 answer
363 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 ...
Julien Guertault's user avatar