/* single scattering only for now */ void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3], const float view[3]) { ListBase *lights; GroupObject *go; LampRen *lar; zero_v3(scatter_col); lights = get_lights(shi); for (go = lights->first; go; go = go->next) { float lacol[3] = {0.f, 0.f, 0.f}; lar = go->lampren; if (lar) { vol_shade_one_lamp(shi, co, view, lar, lacol); add_v3_v3(scatter_col, lacol); } } }
/* single scattering only for now */ void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co) { ListBase *lights; GroupObject *go; LampRen *lar; scatter_col[0] = scatter_col[1] = scatter_col[2] = 0.f; lights= get_lights(shi); for(go=lights->first; go; go= go->next) { float lacol[3] = {0.f, 0.f, 0.f}; lar= go->lampren; if (lar) { vol_shade_one_lamp(shi, co, lar, lacol); add_v3_v3(scatter_col, lacol); } } }