SlangModule

Inherits: SlangComponentType < RefCounted

The granularity of shader code compilation and loading.

Description

A module is the granularity of shader code compilation and loading. Can be created from a SlangSession.

In most cases a module corresponds to a single compilation "translation unit." This will often be a single Slang or HLSL file and everything it #includes.

See the Slang documentation for more information.

Methods

ComputeShaderFile

compile_shader(additional_entry_points: PackedStringArray = PackedStringArray())

SlangEntryPoint

find_and_check_entry_point(entry_point_name: String, shader_stage: RenderingDevice.ShaderStage) const

SlangEntryPoint

find_entry_point(entry_point_name: String) const

SlangEntryPoint

get_defined_entry_point(index: int) const

int

get_defined_entry_point_count() const

PackedStringArray

get_dependency_files() const


Method Descriptions

ComputeShaderFile compile_shader(additional_entry_points: PackedStringArray = PackedStringArray()) 🔗

Compiles this module into a ComputeShaderFile.


SlangEntryPoint find_and_check_entry_point(entry_point_name: String, shader_stage: RenderingDevice.ShaderStage) const 🔗

Find and validate an entry point by name, even if the function is not marked with the [shader(...)] attribute.


SlangEntryPoint find_entry_point(entry_point_name: String) const 🔗

Find and an entry point by name. Note that this does not work in case the function is not explicitly designated as an entry point using the [shader(...)] attribute.


SlangEntryPoint get_defined_entry_point(index: int) const 🔗

Get the defined entry-point at index.


int get_defined_entry_point_count() const 🔗

Get number of entry points defined in the module.


PackedStringArray get_dependency_files() const 🔗

Get the dependency file paths of this module.