diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-11 17:38:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-11 17:38:02 +0300 |
commit | 3a9dcf1fea844796453c98843d24a27a4eef9874 (patch) | |
tree | bfc4c0b2c1ca449b72b8f25e7f5a9123e3256b94 /source/blender/render | |
parent | c6ffe237629b771f86eb92c755b0897e3a2233e0 (diff) | |
parent | 912877f290281190ed2fc12d333ba43c0607874b (diff) |
Sculpt Branch:sculpt25
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r25245:25315
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/SConscript | 43 | ||||
-rw-r--r-- | source/blender/render/intern/source/texture.c | 8 |
2 files changed, 29 insertions, 22 deletions
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript index 2642d31bd35..d9a074c1470 100644 --- a/source/blender/render/SConscript +++ b/source/blender/render/SConscript @@ -1,30 +1,38 @@ #!/usr/bin/python Import ('env') +sources = env.Glob('intern/source/*.c') +raysources = env.Glob('intern/raytrace/*.cpp') + +incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna' +incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf' +incs += ' ../include ../blenloader ../../../intern/smoke/extern' + cflags = env['CCFLAGS'] cxxflags = env['CXXFLAGS'] +defs = [] + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): if env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CCFLAGS'] + ['/arch:SSE'] + cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] if env['OURPLATFORM'] == 'win32-mingw': if env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CCFLAGS'] + ['-mfpmath=sse'] + cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] if env['OURPLATFORM'] == 'darwin': if env['MACOSX_ARCHITECTURE'] in ('i386', 'x86_64') and env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CFLAGS'] + ['-mfpmath=sse'] - cxxflags = env['CXXFLAGS'] + ['-mfpmath=sse'] - -sources = env.Glob('intern/source/*.c') -raysources = env.Glob('intern/raytrace/*.cpp') - -incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna' -incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf' -incs += ' ../include ../blenloader ../../../intern/smoke/extern' - -defs = [] + cflags = env['CFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + +if env['OURPLATFORM'] == 'linux2': + if env['WITH_BF_RAYOPTIMIZATION']: + cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + incs += ' ../../../extern/binreloc/include' if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') @@ -33,15 +41,6 @@ if env['WITH_BF_QUICKTIME']: if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') -if env['OURPLATFORM'] == 'linux2': -# SSE is NOT safe all the time on linux, plus that ignores users compile flags and therefore no no -# cflags = ['-O2','-msse2','-mfpmath=sse', '-pthread'] -# cxxflags = ['-O2','-msse2','-mfpmath=sse', '-pthread'] - if env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CCFLAGS'] + ['-O2','-msse2','-mfpmath=sse', '-pthread'] - cxxflags = env['CXXFLAGS'] + ['-O2','-msse2','-mfpmath=sse', '-pthread'] - incs += ' ../../../extern/binreloc/include' - if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 16372d7a15d..9d03889a747 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1495,6 +1495,14 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen in= 1.0-(facm+fact*(1.0-tex))*(1.0-out); break; + case MTEX_OVERLAY: + facm= 1.0-facg; + if(out < 0.5f) + in = out * (facm + 2.0f*fact*tex); + else + in = 1.0f - (facm + 2.0f*fact*(1.0 - tex)) * (1.0 - out); + break; + case MTEX_SUB: fact= -fact; case MTEX_ADD: |