ShaderModule
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
Keep shaders in your project next to your scripts, with undo, history and live errors.
A ShaderModule is GLSL in the project tree, opened in the Editor like a script and compiled through a small dialect: require("../Utils.frag") pulls a module in once, vec3 Color:ToHSV(vec3 c) defines a namespaced function, and @dotson lets you write Settings.Viewport as a name. Its problems show in the Problems pane, and a ShaderProgram with HotReload recompiles when it changes.
Made with Instance.new("ShaderModule") or Clone().
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Source | string | The module's GLSL, opened in the Editor like a script. | |
| Stage | "Vertex" | "Fragment" | "Library" | Vertex, Fragment, or Library for a module that is only required by other modules. | |
| Compiled | string | read-only | Read-only: the plain GLSL 330 left after the dialect pass. |
| Diagnostics | { ShaderDiagnostic } | read-only | Read-only: its problems, also listed in the Problems pane and underlined in the Editor. |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| GetDependencies | () | { ShaderModule | string } | Returns what its require lines pull in: other ShaderModules, or files on disk by path. |
Events
| Name | Passes | Description |
|---|---|---|
| CompiledChanged | (string) | A ShaderProgram made from this module with HotReload on recompiles when it fires. |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
