You don't need to redraw your objects for every light.
You can follow this algorithm:
[source lang="java"]Color finalColor;for every lightif(light is spotLight)finalColor += shadeSpotLight(currentLight);else if (light is omni)finalColor += shadeOmniLight(currentLight);...[/source]
This should be implemented in your pixel shader.
When you became familiar with shaders You can use a Deferred Lighting technique which is much more appropriate for multiple lights.
esoufianeMember Since 05 Sep 2012
Offline Last Active Today, 03:22 AM
- Group Members
- Active Posts 1
- Profile Views 469
- Submitted Links 0
- Member Title Member
- Age 27 years old
- Birthday November 21, 1986
esoufiane hasn't added any contacts yet.
No latest visitors to show