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:
authorTon Roosendaal <ton@blender.org>2009-05-17 14:30:13 +0400
committerTon Roosendaal <ton@blender.org>2009-05-17 14:30:13 +0400
commitd4116adf11678726a5af5f544a12b194ef2fbcb9 (patch)
treefa1935b49ae317694759fb798c9885f6d2a0aeaf /source/blender/render
parent6dad6bb9bf3a280b228cbd04d9180a35534afefb (diff)
Bugfix #18676
Texture "map to" Ambient did work now (previous fix) but not for ambient occlusion yet.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/shadeoutput.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 4c627056c1d..869cca0f7d0 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1007,9 +1007,9 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float *spec)
/* pure AO, check for raytrace and world should have been done */
void ambient_occlusion(ShadeInput *shi)
{
- if((R.wrld.ao_gather_method == WO_AOGATHER_APPROX) && shi->mat->amb!=0.0f)
+ if((R.wrld.ao_gather_method == WO_AOGATHER_APPROX) && shi->amb!=0.0f)
sample_occ(&R, shi);
- else if((R.r.mode & R_RAYTRACE) && shi->mat->amb!=0.0f)
+ else if((R.r.mode & R_RAYTRACE) && shi->amb!=0.0f)
ray_ao(shi, shi->ao);
else
shi->ao[0]= shi->ao[1]= shi->ao[2]= 1.0f;
@@ -1020,8 +1020,8 @@ void ambient_occlusion(ShadeInput *shi)
void ambient_occlusion_to_diffuse(ShadeInput *shi, float *diff)
{
if((R.r.mode & R_RAYTRACE) || R.wrld.ao_gather_method == WO_AOGATHER_APPROX) {
- if(shi->mat->amb!=0.0f) {
- float f= R.wrld.aoenergy*shi->mat->amb;
+ if(shi->amb!=0.0f) {
+ float f= R.wrld.aoenergy*shi->amb;
if (R.wrld.aomix==WO_AOADDSUB) {
diff[0] = 2.0f*shi->ao[0]-1.0f;