Compare GPU memory size between 1 vec4 uniform and 1vec4 vertexAttribute

compare GPU memory size between 1 vec4 uniform and 1vec4 vertexAttribute, what’s the different?
eg. a 4 vertices quad, what’s the different of GPU memory size between: 1. the vec4 V is uniform; 2. the vec4 V is vertexAttribute. Except this, all the other conditions are same.
moreover, what if when this vec4 is update by perVertex VS perInstance?
Thanks!

I don’t understand the question. What does this vec4 represent? How can it be a “quad”; doesn’t that require 4 vertices? Are you asking about the difference between a vec4 uniform array (of 4 elements) that you index in the shader (presumably using gl_VertexID or something) compared to attributes?

And most important of all… why do you think the “memory size” is even a relevant question to ask? What kind of memory? Buffer storage, in-shader storage, number of registers consumed? Because all of those are different, all of those have different memory capacities and performance characteristics, and it’s all very hardware dependent.

1 Like

this vec4 is just used in shader and there is other variables to draw as usual.
just want to compare the GPU memory details of uniform, vertexAttribute perVertex; perInstance, varing, etc.
is there any good tutorial about the hardware detail of each types of shader var.
Buffer storage, in-shader storage, number of registers, how to find the specification of each vendor. if not possible, what keyword to find good common tutorial about this?
Thanks very much!