Shader writing with OSL
I've been away on holiday so this is my first post for a while. I have really developed an interest in shader writing recently, which has come from developing the 'Space' series of shader plugins. It turns out there are so many ways to write shaders! You can write them natively for any DCC, or you can write them for third-party renderers such as Vray, Arnold, etc. Or you can use something like Renderman Shading Language (RSL), OpenGL Shading Language (GLSL, used in OpenGL, the Web Graphics Library, ShaderToy, etc.), Lua (used in Filter Forge filters - yes, I know those aren't shaders, but the relationship is there) and so on.
There is also one open-source shader language which is supported across several different renderers and, very importantly, if you want to write shaders for Redshift, this is the language to use: Open Shading Language or OSL. (Just to note, it seems to be impossible right now - and maybe always will be - to write 'native' shader nodes for Redshift. The only way is to use OSL.)
There are a lot of resources for writing OSL shaders. For example, there is:
- offical documentation at https://open-shading-language.readthedocs.io/en/v1.13.10.0/
- source code for OSL itself at https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
- Wikipedia page at https://en.wikipedia.org/wiki/Open_Shading_Language
- Blender Cycles manual: https://docs.blender.org/manual/en/2.80/render/shader_nodes/osl.html
- collection of OSL shaders for Redshift: https://github.com/redshift3d/RedshiftOSLShaders
No doubt there are lots more if you poke around the net. There is also a new book, 'Shader Writing in Open Shading Language With Renderman Examples' by Mitch Prater. I have just got a copy of this and am looking through it now. It's expensive, and as the title suggests uses Renderman as the renderer but it still should be very valuable to anyone writing OSL shaders for Redshift. I might write a short review when I've had more time to study it but for now, you can get it from Amazon in ebook or printed formats.
In the meantime, the main issue for me is to work out how/if OSL shaders for Renderman, Blender, etc. can be ported to Redshift. I'll report back when I know more.
Page last updated October 29th 2024