Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-28 00:40:08 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-28 00:40:08 +0300
commit5445dda2956d64385b20874592b3305b7056505a (patch)
tree59975e804583931180994c24b0d3d04e485e7d0f /source/blender/blenloader
parent478dc000b3d65af48422154769641a3ecbe071d8 (diff)
Ambient Occlusion split up into:
Ambient occlusion: multiplied with direct lighting by default, add is also still available and more blending methods might be added if they are useful. This is fundamentally a non physical effect. Environment lighting: always added as you would expect (though you can subtract by specifying negative energy). This can be just white or take colors or textures from the world. Indirect lighting: only supported for AAO at the moment (and is still too approximate), and also is always added. A factor is available to specify how much is added, though value 1.0 is correct. Also: * Material ambient value now defaults to 1.0. * Added Environment, Indirect and Emit pass. * "Both" blending method is no longer available. * Attenuation, sampling parameters are still shared, some could be split up, though if they are different this would affect performance.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c3457adc288..84b27ad44eb 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10604,6 +10604,36 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 15)) {
+ World *wo;
+ Material *ma;
+
+ /* ambient default from 0.5f to 1.0f */
+ for(ma= main->mat.first; ma; ma=ma->id.next)
+ ma->amb *= 2.0f;
+
+ for(wo= main->world.first; wo; wo=wo->id.next) {
+ /* ao splitting into ao/env/indirect */
+ wo->ao_env_energy= wo->aoenergy;
+ wo->aoenergy= 1.0f;
+
+ if(wo->ao_indirect_bounces == 0)
+ wo->ao_indirect_bounces= 1;
+ else
+ wo->mode |= WO_INDIRECT_LIGHT;
+
+ if(wo->aomix == WO_AOSUB)
+ wo->ao_env_energy= -wo->ao_env_energy;
+ else if(wo->aomix == WO_AOADDSUB)
+ wo->mode |= WO_AMB_OCC;
+
+ wo->aomix= WO_AOMUL;
+
+ /* ambient default from 0.5f to 1.0f */
+ mul_v3_fl(&wo->ambr, 0.5f);
+ wo->ao_env_energy *= 0.5f;
+ }
+ }
/* put 2.50 compatibility code here until next subversion bump */
//{