class Opal::Shader::RaymarchSpherePass

Overview

Procedural 3D Raymarched Sphere shader pass with dynamic orbital lighting, diffuse Lambertian shading, specular highlights, and ASCII luminance ramping.

Defined in:

opal/shader/presets.cr

Constant Summary

RAMP = [' ', '.', ':', '-', '=', '+', '*', '%', '#', '@', '$']

Constructors

Instance Method Summary

Instance methods inherited from class Opal::Shader::Pass

apply(source : UI::Buffer, target : UI::Buffer, time : Float64, frame : UInt64) : Nil apply, enabled=(enabled : Bool) enabled=, enabled? : Bool enabled?, region : Rect | Nil region, region=(region : Rect | Nil) region=

Constructor methods inherited from class Opal::Shader::Pass

new(region : Rect | Nil = nil) new

Constructor Detail

def self.new(region : Rect | Nil = nil, speed : Float64 = 1.0, radius : Float64 = 0.75, sphere_color : Color | Symbol | String = :bright_cyan, light_color : Color | Symbol | String = :white, preserve_text : Bool = false) #

[View source]

Instance Method Detail

def apply(source : UI::Buffer, target : UI::Buffer, time : Float64, frame : UInt64) : Nil #

[View source]
def light_color : Color #

[View source]
def light_color=(light_color : Color) #

[View source]
def preserve_text=(preserve_text : Bool) #

[View source]
def preserve_text? : Bool #

[View source]
def radius : Float64 #

[View source]
def radius=(radius : Float64) #

[View source]
def speed : Float64 #

[View source]
def speed=(speed : Float64) #

[View source]
def sphere_color : Color #

[View source]
def sphere_color=(sphere_color : Color) #

[View source]