Logo
Toggle Menu
  • home
  • blog
  • about
    • about this site
    • contact
    • privacy policy
  • cinema 4d
    • plugins
    • creating c4d plugins
    • plugin cookbook
    • software
  • models
    • nodes
    • plants 1
    • other models - 1
    • other models - 2
  • x-particles
    • book

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

Blog articles

Using Graswald assets in C4D (May 7th 2025)

Which Mac for plugin development? (May 3rd 2025)

Why do plugin writers do it? (April 11th 2025)

Updating StarScape (February 26th 2025)

Using Cinema 4D shaders in Redshift (January 31st 2025)

PHP and MySQL (December 19th 2024)

Shader writing with OSL - 2 (November 11th 2024)

Shader writing with OSL (October 29th 2024)

StarScape (September 25th 2024)

Converting plugins from C4D 2024 to 2025 (September 16th 2024)

Cinema 4D 2025 and macOS plugins (September 15th 2025)

© 2021-2024 Microbion. All Rights Reserved.