# indirect lighting for terrain

This topic is 4233 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

well im not rly into indirect lighting... havent rly looked into it but ive got a few ideas... just posting it here for confirmation... in the first pass i have each point illuminted by a lightsource using the dotproduct of the points normal and the lightnormal... in the second pass i take a point and use the dotvector between the point and each surrounding point withing a certain distance and in the horizon of the points ... multipliying this with the other points brightness and dividing it by the distance times a constant... it would look somethig like this...
Point = P
PointNormal = PN
Surrounding point = SP
Surrounding point normal = SPN

for each P on the terrain
P Brightness = max(0,DotProduct(PN, LightDirectionNormal)) * Light Brightness

for each P on the terrain
for each SP within a certain distance
if SP is within horizon
FinalPointBrightness = P Brightness + SP Brightness *max(0,DotProduct(PN, SPN))/(distance from P to SP * constant)


would this work in realtime? if i have a precalcualted horizonmap