-
Notifications
You must be signed in to change notification settings - Fork 0
Shader
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Shader |
| Namespace | Electron2D |
| Kind | class |
| Category | Rendering |
Provides the Electron2D resource for a canvas shader source.
public sealed class Electron2D.Shader : Electron2D.ResourceProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Shader
Canvas item shader resource storing source code for import-time compilation.
Shader stores source code that is imported by Electron2D tooling into
compiled canvas shader stages. Electron2D 0.1.0 Preview supports only the
canvas item mode.
ShaderMaterial, uniforms and sampler assignment are implemented by later
tasks. This type intentionally does not expose the shader compiler backend or the native GPU backend
handles.
This type is not synchronized. Mutate shader code on the main thread or in a single import worker.
This type is available since Electron2D 0.1.0 Preview.
| Member | Kind | Summary |
|---|---|---|
Code |
Property | Gets or sets the shader source code. |
Electron2D.Shader() |
Constructor | Initializes a new instance of the Shader type. |
GetMode() |
Method | Gets the shader mode. |
Kind: Property
public System.String Code { get; set; }Gets or sets the shader source code.
The source is stored as written by the user. Import tooling parses the
shader_type canvas_item;, vertex_entry and fragment_entry header
directives before sending HLSL to the shader compiler backend.
The current code value.
This property is not synchronized. Mutate it on the main thread or in a single import worker.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Shader
Kind: Constructor
public Electron2D.Shader()Initializes a new instance of the Shader type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.Shader
Kind: Method
public Electron2D.Shader.Mode GetMode()()Gets the shader mode.
This method follows the validation and lifetime rules of its declaring type.
Electron2D.Shader.Mode.CanvasItem, the only supported shader mode in Electron2D 0.1.0 Preview.
This method is safe to call from any thread when the shader is not being mutated concurrently.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Shader
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.