Questions tagged [uniform-buffer-object]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
57 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 ...
0
votes
1answer
50 views

Force int array to compact memory

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

Veldrid: Only execute fragment shader

Having an HLSL shader like this: ...
3
votes
1answer
897 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 ...
8
votes
2answers
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 '...
0
votes
1answer
4k 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: ...
3
votes
1answer
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 ...
10
votes
1answer
239 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 ...