Ive been developing a shader for use with AGK2
at the moment i have a single shader that i link to all the object in my scene.
then each object has a set of textures linked to each. these textures are Color , normal , specular etc.
the textures can be different for each object and are what controls the shader allowing for all the many rendering effects..
I know i can send data to a shader but this effects all object using the same shader.
My question is can i pass data from a specific object to she shader just like with the textures but instead pass numbers.
in this way the shader can do different things for different objects.
this could be used to precalculate positions of static lights. or have features of my shader turn on or off depending on the object that is using it.
This could help especially with lighting which needs to iterate through a list of lights at runtime , i could instead pre-calculate and link in only the 1 or 2 lights that effect this one object . rendering time speed increases.
of course this is only for static lights and objects but as most geometry falls into this category.
Anyway thanks if anyone can help.