Hi,
I am simply looking for some best practices on how to store more complex data types in textures and how to access them in glsl.
For example if I would want to store parameters for pointlights I might have a struct like this:
struct PointLight
{
vec3 Ambient;
vec3 Diffuse;
vec3 Specular;
vec3 Position;
float Radius;
};
Obviously texture access via samplers only allow me to retrieve vec4's at a time.
Basically I'm most interested in how you efficiently setup the layout of the texture (or textures). Thing like use a single texture for each component or pack them together or how to pack the components together, what kind of textures to use etc.
I dont want specific answers to THIS example struct.. I am looking for a general truth
Like do things that change often (maybe the positions) in a seperat texture while compose the other components together in one texture. (just an assumption however)
I hope you can give me a direction here,
Wh0p.