diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-06 22:11:47 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-06 22:11:47 +0300 |
commit | c1d8ddacaf14c7cd3d287b3e85c8914ddf75780d (patch) | |
tree | 7b9c7cb174f888f85e9351fa7cd6d41772cfb5e0 /intern | |
parent | 7c19239bf96f2d264661e86999b7b0db678b8adc (diff) |
Cycles: Avoid doing paranoid checks in filepath of builtin images
Originally we thought it's needed in order to distinguish builtin file from
filename which starts with '@', but the filepath is actually full path there
and it's unlikely to have file system where '@' is a proper root character.
Surprisingly this does not give visible speed differences, but it's still
nice to get rid of redundant check.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/osl/osl_services.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index 064edb6ead3..f865cfb326e 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -887,7 +887,7 @@ bool OSLRenderServices::texture(ustring filename, TextureOpt &options, #endif bool status; - if(filename[0] == '@' && filename.find('.') == -1) { + if(filename[0] == '@') { int slot = atoi(filename.c_str() + 1); float4 rgba = kernel_tex_image_interp(slot, s, 1.0f - t); @@ -940,7 +940,7 @@ bool OSLRenderServices::texture3d(ustring filename, TextureOpt &options, ShaderData *sd = (ShaderData *)(sg->renderstate); KernelGlobals *kg = sd->osl_globals; bool status; - if(filename[0] == '@' && filename.find('.') == -1) { + if(filename[0] == '@') { int slot = atoi(filename.c_str() + 1); float4 rgba = kernel_tex_image_interp_3d(slot, P.x, P.y, P.z); |