We have a pixel shader constant buffer that contains the light data for the item that is currently rendered.
To implement tangent space normal mapping, i would need to transform each light into tangent space.
Is it a valid approach to instead bind the light data to the vertex shader and then send the transformed Light Data to the pixel shader since the vertex shader runs less frequently than the pixel shader?
As a side note: I am using forward rendering with a limited light count.
Our pixel shader constant buffer looks like this:
struct RendererLight {
float3 Position;
float3 Color;
float3 Direction;
float Intensity;
float In;
float Out;
float Range;
};
cbuffer LightsBuffer : register(b2)
{
RendererLight Lights[8];
uint NumLights;
};