I found tons of point light per-pixel attenuation samples that use vertex programs but can find any examples that simulate spotlights in vertex programs. I’m not expirienced in opengl math so maybe someone did it. If someone knows where can I find code please answer me
Thanx in advance
Dot product the vertex pos and your spotlight matrix.
DP4 outTexture.x, mtx, inPosition;
DP4 outTexture.y, mtx, inPosition;
DP4 outTexture.z, mtx, inPosition;
DP4 outTexture.w, mtx, inPosition;
Could you please give me source code