Jan
06-05-2004, 07:59 AM
Hi there
In a shader i (theoretically) want to fetch a material-value from a texture. However some objects wonīt have such a material, so that itīs value will always be 1 or 0.
Now, instead of writing another shader (and of course switching between lots of only slightly different shaders), i can also bind a "dummy"-texture, which is plain white or black.
Of course such a texture would only be 2x2, or so. So, how expensive is such texture-access ? Should i expect the same performance hit, as if i used a bigger texture, or should it be very fast ?
Thanks,
Jan.
In a shader i (theoretically) want to fetch a material-value from a texture. However some objects wonīt have such a material, so that itīs value will always be 1 or 0.
Now, instead of writing another shader (and of course switching between lots of only slightly different shaders), i can also bind a "dummy"-texture, which is plain white or black.
Of course such a texture would only be 2x2, or so. So, how expensive is such texture-access ? Should i expect the same performance hit, as if i used a bigger texture, or should it be very fast ?
Thanks,
Jan.