Material Question: Vector 3 (RGB) Memory Footprint?

Hi everyone,

Just curious how a vector 3 (RGB) node compares to a texture sample node from a memory footprint perspective? Does the vector 3 (RGB) node have an associated resolution (e.g. 1024 x 1024) or is it a single pixel repeated across the whole mesh?

Any clarification will be greatly appreciated. Thanks!

it’s just a vector value. 3 times of float. this is all memory it uses.

but in case of operations…
if you, for example, multiply it on float, every component of this vector will be multiplied on that float. so, speaking roughly, it requires 3 multiplication operations.
if you multiply it on another vector3, it also requires 3 operations: R1R2, G1G2, B1*B2

texture is array of pixels, and every pixel is vector3 (RGB).
so, if you multiply simple vector3 on 10241024 texture, it requires to multiply every pixel on that vector. 10241024*3.

Thanks for the reply. How does the vector 3 operate by itself though without any explicit resolution? Is it the equivalent of a single pixel which is then stretched to accommodate the mesh UVs?

something like this, yes…

It is literally just a set of 3 values. Meanwhile a texture is a 2-dimensional array of similar sets of 3 values.

When using a texture, the shader uses the UVs to know what position in the array it should look at.

Here’s some pseudo code that sort of resembles what happens in the pixel shader.

  • Texture:
    diffuse = value_of(Texture)_at_position(UVCoordinates_of_this_pixel)
  • Vector 3:
    diffuse = value_of(Vector 3)