diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-02 13:40:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-03 16:36:20 +0300 |
commit | fadb6f34662fb60e1a48c2c053c500f017206f27 (patch) | |
tree | 48c16c2215e7110e00b4255f6230aa3491d94ee0 /intern/cycles/render/osl.h | |
parent | 08a44d29815f6b0b9b675a503829d2e2ce7f6426 (diff) |
Cleanup: refactor Cycles OSL texture handling
This adds our own OSL texture handle, that has info for OIIO textures or our
own custom texture types. A filename to handle hash map is used for lookups.
This is efficient because it happens at OSL compile time, because the optimizer
can figure out constant strings and replace them with texture handles.
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r-- | intern/cycles/render/osl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h index 4d930d65e45..773252ce9dc 100644 --- a/intern/cycles/render/osl.h +++ b/intern/cycles/render/osl.h @@ -153,6 +153,9 @@ class OSLCompiler { void parameter_attribute(const char *name, ustring s); + void parameter_texture(const char *name, ustring filename, int svm_slot); + void parameter_texture_ies(const char *name, int svm_slot); + ShaderType output_type() { return current_type; |