Fix [#21874] Sun/ Sky breaks when sun is in the night rotation
Disable atmosphere when the sun lamp direction is below the horizon. This feature needs a re-code...
This commit is contained in:
@@ -739,10 +739,15 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl)
|
||||
if(*zrect >= 9.9e10 || rgbrect[3]==0.0f) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if((lar->sunsky->effect_type & LA_SUN_EFFECT_AP)) {
|
||||
float tmp_rgb[3];
|
||||
|
||||
/* skip if worldspace lamp vector is below horizon */
|
||||
if(go->ob->obmat[2][2] < 0.f) {
|
||||
continue;
|
||||
}
|
||||
|
||||
VECCOPY(tmp_rgb, rgbrect);
|
||||
if(rgbrect[3]!=1.0f) { /* de-premul */
|
||||
float div= 1.0f/rgbrect[3];
|
||||
|
||||
Reference in New Issue
Block a user