diff options
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r-- | intern/cycles/render/osl.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h index 9b58745bd46..3c599caa893 100644 --- a/intern/cycles/render/osl.h +++ b/intern/cycles/render/osl.h @@ -45,6 +45,18 @@ class ShaderOutput; #ifdef WITH_OSL +/* OSL Shader Info + * to auto detect closures in the shader for MIS and transparent shadows */ + +struct OSLShaderInfo { + OSLShaderInfo() + : has_surface_emission(false), has_surface_transparent(false) + {} + + bool has_surface_emission; + bool has_surface_transparent; +}; + /* Shader Manage */ class OSLShaderManager : public ShaderManager { @@ -65,6 +77,7 @@ public: const char *shader_test_loaded(const string& hash); const char *shader_load_bytecode(const string& hash, const string& bytecode); const char *shader_load_filepath(string filepath); + OSLShaderInfo *shader_loaded_info(const string& hash); protected: void texture_system_init(); @@ -74,7 +87,7 @@ protected: OSL::TextureSystem *ts; OSLRenderServices *services; OSL::ErrorHandler errhandler; - set<string> loaded_shaders; + map<string, OSLShaderInfo> loaded_shaders; }; #endif |