# Documentation for the glslfx format

**URL:** https://forum.aousd.org/t/documentation-for-the-glslfx-format/650
**Category:** Hydra
**Created:** [September 13, 2023, 4:31am UTC](https://forum.aousd.org/t/documentation-for-the-glslfx-format/650 "2023-09-13T04:31:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ChrisK](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@ChrisK](https://forum.aousd.org/u/ChrisK)
#### Post date: [September 13, 2023, 4:31am UTC](https://forum.aousd.org/t/documentation-for-the-glslfx-format/650/1 "2023-09-13T04:31:00Z")

</div>

I am interested in writing some custom glsl shaders to use in storm or the Houdini/Solaris viewport.

In each of the glslfx files there is a configuration block. Is there any documentation on what this metadata means?

Thanks,  
Chris King  
Dneg

---

<div class="post-metadata">

### Author: ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)
#### Post date: [September 15, 2023, 1:01am UTC](https://forum.aousd.org/t/documentation-for-the-glslfx-format/650/2 "2023-09-15T01:01:51Z")

</div>

Hey Chris, I _think_ the answer is no, unfortunately, but for a definitive answer on imaging-related questions, can you make your future posts in the “Hydra” category here?

---

<div class="post-metadata">

### Author: ![tomc](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tomc](https://forum.aousd.org/u/tomc)
#### Post date: [October 6, 2023, 11:36pm UTC](https://forum.aousd.org/t/documentation-for-the-glslfx-format/650/3 "2023-10-06T23:36:12Z")

</div>

I don’t think we’ve published any, although we hope to remedy that. In the meantime, we’re happy to answer questions, and you can use some of the existing code as a template.

GLSLFX has a few different types of blocks:

- “glsl”, specifying a named block of shader code. Note that in Storm, at least, the shader code makes careful use of abstractions and macros to be both GLSL and MSL friendly. If it’s run as part of hydra, it can access geometry data with HdGet\_\* calls that are automatically generated by the geometry description.
- “layout”, specifying the format of interstage data for an associated glsl block; this is mostly used by hdStorm internal snippets, and is used to automatically generate buffer binding statements.
- “configuration”, which can be used to concatenate named “glsl” blocks together to provide an entrypoint for a certain shader stage. In Hydra, the entry points we support for scene materials are “displacementShader”, “surfaceShader”, and “volumeShader”, though GLSLFX has facilities for specifying GPU shader stages as well.  
… and then we also support #import, which is just #include.

Let me know if there’s anything else you want clarification on.
