class
CrShader::Composer
- CrShader::Composer
- Reference
- Object
Overview
============================================================================= Composer - Runtime Multi-Trait Shader Assembler & Variant Compiler
Defined in:
crshader/composer/shader_composer.crcrshader_resource.cr
Constructors
- .canvas_item : self
- .compositor_effect(stage : Symbol | String = :post_transparent, depth : Bool = false, normal_roughness : Bool = false) : self
- .new(mode : Mode = Mode::Spatial)
- .screen_effect(mode : Symbol | String = :canvas, depth : Bool = false) : self
- .spatial(preset : Symbol | String | Nil = nil) : self
Instance Method Summary
- #compile(target : ShaderTarget | Nil = nil, cache : VariantCache = VariantCache.global) : String
- #compile_godot_shader(cache : VariantCache = VariantCache.global) : Godot::Shader | Nil
- #compositor_stage : String
- #compositor_stage=(compositor_stage : String)
- #declared_features : Array(Tuple(String, FeatureValue, Array(String)))
- #declared_features=(declared_features : Array(Tuple(String, FeatureValue, Array(String))))
- #feature_overrides : Hash(String, FeatureValue)
- #feature_overrides=(feature_overrides : Hash(String, FeatureValue))
- #fragment(code : String) : self
- #fragment_body : String | Nil
- #fragment_body=(fragment_body : String | Nil)
- #light(code : String) : self
- #light_body : String | Nil
- #light_body=(light_body : String | Nil)
- #mode : Mode
- #needs_depth : Bool
- #needs_depth=(needs_depth : Bool)
- #needs_normal_roughness : Bool
- #needs_normal_roughness=(needs_normal_roughness : Bool)
- #pixel(code : String) : self
- #pixel_body : String | Nil
- #pixel_body=(pixel_body : String | Nil)
- #preset : String | Nil
- #preset=(preset : String | Nil)
- #release(enabled : Bool = true) : self
- #render_mode_list : Array(String)
- #render_mode_list=(render_mode_list : Array(String))
- #render_modes(*modes : Symbol | String) : self
- #screen_mode : String
- #screen_mode=(screen_mode : String)
- #strip_debug_inspects : Bool
- #strip_debug_inspects=(strip_debug_inspects : Bool)
- #to_crshader : String
- #traits : Array(TraitUse)
- #traits=(traits : Array(TraitUse))
- #uniform_lines : Array(String)
- #uniform_lines=(uniform_lines : Array(String))
- #vertex(code : String) : self
- #vertex_body : String | Nil
- #vertex_body=(vertex_body : String | Nil)
- #with_feature(name : Symbol | String, value : FeatureValue, options : Array(Symbol | String) | Nil = nil) : self
- #with_trait(path_or_name : Symbol | String, prefix : Symbol | String | Nil = nil) : self
- #with_uniform(name : Symbol | String, type_name : Symbol | String, default : String | Nil = nil, hint : Symbol | String | Nil = nil, range : ::Range(Float64, Float64) | ::Range(Float32, Float32) | Nil = nil) : self
Constructor Detail
def self.compositor_effect(stage : Symbol | String = :post_transparent, depth : Bool = false, normal_roughness : Bool = false) : self
#
Instance Method Detail
def compile(target : ShaderTarget | Nil = nil, cache : VariantCache = VariantCache.global) : String
#
def with_feature(name : Symbol | String, value : FeatureValue, options : Array(Symbol | String) | Nil = nil) : self
#
def with_uniform(name : Symbol | String, type_name : Symbol | String, default : String | Nil = nil, hint : Symbol | String | Nil = nil, range : ::Range(Float64, Float64) | ::Range(Float32, Float32) | Nil = nil) : self
#