Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/light.cpp
| Context not available. | |||||
| else if (light->type == LIGHT_DISTANT) { | else if (light->type == LIGHT_DISTANT) { | ||||
| shader_id &= ~SHADER_AREA_LIGHT; | shader_id &= ~SHADER_AREA_LIGHT; | ||||
| float radius = light->size; | float angle = light->sun_angle / 2.0f; | ||||
| float angle = atanf(radius); | float radius = tanf(angle); | ||||
| float cosangle = cosf(angle); | float cosangle = cosf(angle); | ||||
| float area = M_PI_F * radius * radius; | float area = M_PI_F * radius * radius; | ||||
| float invarea = (area > 0.0f) ? 1.0f / area : 1.0f; | float invarea = (area > 0.0f) ? 1.0f / area : 1.0f; | ||||
| Context not available. | |||||