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:
Diffstat (limited to 'intern/cycles/kernel/osl/osl_services.h')
-rw-r--r--intern/cycles/kernel/osl/osl_services.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/osl_services.h b/intern/cycles/kernel/osl/osl_services.h
index 190234a7706..aa2befd6e98 100644
--- a/intern/cycles/kernel/osl/osl_services.h
+++ b/intern/cycles/kernel/osl/osl_services.h
@@ -104,6 +104,55 @@ public:
const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy,
const OSL::Vec3 &dPdz, int nchannels, float *result);
+#if OSL_LIBRARY_VERSION_CODE >= 10600
+ bool texture(ustring filename,
+ TextureHandle * /*texture_handle*/,
+ TexturePerthread * /*texture_thread_info*/,
+ TextureOpt &options,
+ OSL::ShaderGlobals *sg,
+ float s, float t,
+ float dsdx, float dtdx, float dsdy, float dtdy,
+ int nchannels,
+ float *result,
+ float * /*dresultds*/,
+ float * /*dresultdt*/)
+ {
+ /* TODO(sergey): Support derivatives. */
+ return texture(filename,
+ options,
+ sg,
+ s, t,
+ dsdx, dtdx, dsdy, dtdy,
+ nchannels,
+ result);
+ }
+
+ bool texture3d(ustring filename,
+ TextureHandle * /*texture_handle*/,
+ TexturePerthread * /*texture_thread_info*/,
+ TextureOpt &options,
+ OSL::ShaderGlobals *sg,
+ const OSL::Vec3 &P,
+ const OSL::Vec3 &dPdx,
+ const OSL::Vec3 &dPdy,
+ const OSL::Vec3 &dPdz,
+ int nchannels,
+ float *result,
+ float * /*dresultds*/,
+ float * /*dresultdt*/,
+ float * /*dresultdr*/)
+ {
+ /* TODO(sergey): Support derivatives. */
+ return texture3d(filename,
+ options,
+ sg,
+ P,
+ dPdx, dPdy, dPdz,
+ nchannels,
+ result);
+ }
+#endif
+
bool environment(ustring filename, TextureOpt &options,
OSL::ShaderGlobals *sg, const OSL::Vec3 &R,
const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy,