class
CrShader::CRShader
- CrShader::CRShader
- Godot::Shader
- Godot::Resource
- Godot::RefCounted
- Godot::Object
- Reference
- Object
Overview
============================================================================= CRShader - First-Class Shading Language Resource for Godot
Inherits natively from Godot::Shader. Holds Crystal-based .crshader source and compiles transparently in-memory into Godot's native shader bytecode.
Defined in:
crshader_resource.crConstructors
Class Method Summary
- ._godot_has_virtual_method(method_name : String) : Bool
- ._godot_register_node_class : Void
- .godot_class_name : String
- .godot_parent_class_name : String
Macro Summary
-
autoload(*args, **kwargs)
DSL directives for in-body autoload configuration
- autoload_node(*args, **kwargs)
- build(**kwargs, &block)
- create(**kwargs, &block)
Instance Method Summary
-
#_godot_call_tool_button(button_name : String) : Void
Dispatches inspector tool button clicks on this object.
-
#_godot_call_virtual(method_name : String, delta : Float64) : Void
Virtual method and property dispatch hooks overridden by class registration macros.
-
#_godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void
Dispatches generic virtual methods with raw arguments and return buffer.
- #_godot_dispatch_crystal_0(method : String) : Bool
- #_godot_dispatch_crystal_1(method : String, a0 : Godot::Variant) : Bool
-
#_godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void
Invoked by the GDExtension bridge when retrieving an exposed
@exportproperty. -
#_godot_has_crystal_method?(method : String) : Bool
Internal hooks overridden by Lapis
node/gdclass/resourceclasses to expose Crystal-defined methods. -
#_godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void
Invoked by the GDExtension bridge when setting an exposed
@exportproperty. - #active_features : Hash(String, FeatureValue)
- #active_features=(active_features : Hash(String, FeatureValue))
-
#apply_dictionary_properties!(dict : Godot::Dictionary) : Void
Populates
@[Export]properties on this object from aGodot::Dictionary. -
#compile_and_sync_targets!(write_disk : Bool = true) : Array(Tuple(String, ShaderTarget, String))
Compiles all
emit_targetoutputs (or default sibling output), optionally writes them to disk, and hot-reloads any cachedGodot::Shaderresources inResourceLoaderso open scenes update live. - #crshader_source : String
- #crshader_source=(crshader_source : String)
-
#export_config_hash : UInt64
Computes a deterministic 64-bit hash of all
@[Export]properties on this object. -
#export_gdshader : Void
Tool button: Exports compiled GDShader to disk on-demand
-
#export_gdshaderinc : Void
Tool button: Exports compiled GDShader include header (.gdshaderinc) to disk on-demand
-
#export_glsl : Void
Tool button: Exports compiled GLSL compute shader to disk on-demand
- #file_path : String
- #file_path=(file_path : String)
- #last_compiled_code : String
- #last_compiled_code=(last_compiled_code : String)
- #last_error_line : Int32
- #last_error_line=(last_error_line : Int32)
- #last_error_message : String
- #last_error_message=(last_error_message : String)
- #last_resolved_target : ShaderTarget
- #last_resolved_target=(last_resolved_target : ShaderTarget)
- #recompile : Bool
- #resolve_disk_path(path : String) : String
- #set_crshader_source(source : String) : Void
- #set_feature(name : Symbol | String, value : FeatureValue) : Bool
- #shader_target : String
- #shader_target=(shader_target : String)
- #specialize(features : Hash(String, FeatureValue), cache : VariantCache = VariantCache.global) : Godot::Shader | Nil
- #specialize(**features) : Godot::Shader | Nil
- #strip_debug_inspects : Bool
- #strip_debug_inspects=(strip_debug_inspects : Bool)
-
#trigger_recompile : Void
Tool button: Recompiles shader in-memory
Constructor Detail
Class Method Detail
Macro Detail
Instance Method Detail
Dispatches inspector tool button clicks on this object.
Virtual method and property dispatch hooks overridden by class registration macros.
Delta timestep is received with 64-bit precision (Float64).
Dispatches generic virtual methods with raw arguments and return buffer.
Invoked by the GDExtension bridge when retrieving an exposed @export property.
Internal hooks overridden by Lapis node/gdclass/resource classes to expose Crystal-defined methods.
Invoked by the GDExtension bridge when setting an exposed @export property.
Populates @[Export] properties on this object from a Godot::Dictionary.
Compiles all emit_target outputs (or default sibling output), optionally writes them to disk,
and hot-reloads any cached Godot::Shader resources in ResourceLoader so open scenes update live.
Computes a deterministic 64-bit hash of all @[Export] properties on this object.
Tool button: Exports compiled GDShader include header (.gdshaderinc) to disk on-demand