class CrShader::Compiler

Defined in:

crshader/compiler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(target_override : ShaderTarget | Nil = nil, verbose : Bool = false, optimize_names : Bool = false, skip_validation : Bool = false, feature_overrides : Hash(String, FeatureValue) = {} of String => FeatureValue, strip_debug_inspects : Bool = false, godot_compute_header : Bool = false) #

Instance Method Detail

def compile(source : String, target : ShaderTarget | Nil = nil) : String #

def compile_emit_targets(source : String, filename : String | Nil = nil, write_disk : Bool = true) : Array(Tuple(String, ShaderTarget, String)) #

Compiles all emit_target outputs declared in source (or the single default sibling output when no emit_target directive is present). Returns {output_path, target, code} tuples.


def compile_file(input_path : String, output_path : String | Nil = nil) : String #

def compile_source(source : String, filename : String | Nil = nil) : String #

def feature_overrides : Hash(String, FeatureValue) #

def feature_overrides=(feature_overrides : Hash(String, FeatureValue)) #

def godot_compute_header : Bool #

def godot_compute_header=(godot_compute_header : Bool) #

def last_program : ShaderProgram | Nil #

def optimize_names : Bool #

def optimize_names=(optimize_names : Bool) #

def skip_validation : Bool #

def skip_validation=(skip_validation : Bool) #

def strip_debug_inspects : Bool #

def strip_debug_inspects=(strip_debug_inspects : Bool) #

def target_override : ShaderTarget | Nil #

def target_override=(target_override : ShaderTarget | Nil) #

def verbose : Bool #

def verbose=(verbose : Bool) #