6
votes
2answers
843 views

Rendering collections of light sources

I have a small test environment where small point lights are scattered. Players should able to collect them. The collectible lights are rendered using a simple billboard technique where two triangles ...
5
votes
2answers
943 views

Different number of lights => different shader

I have a shader that computes lighting for each light. PointLight PointLights[10]; uniform const float NumPointLights; for(int i = 0; i < NumPointLights; i++) { lightVec = ...
6
votes
4answers
2k views

HLSL: Using instance float input to select texture index, possible?

I'm writing a game for the xbox360 using XNA. I would like to draw several models with a single DrawInstancedPrimitives call. Each model will use a different texture. To do this, I would like to ...