class Prism::SkyboxShader

Overview

A generic shader for the GUI

Defined in:

prism/stdlib/shaders/skybox_shader.cr

Constant Summary

ROTATE_SPEED = 1_f32

Constructors

Instance Method Summary

Instance methods inherited from class Prism::Shader::Program

finalize finalize, set_uniform(name : String, value : Array(Shader::UniformStruct))
set_uniform(name : String, value : Shader::UniformStruct)
set_uniform(name : String, value : LibGL::Int)
set_uniform(name : String, value : LibGL::Float)
set_uniform(name : String, value : Vector3f)
set_uniform(name : String, value : Vector2f)
set_uniform(name : String, value : Matrix4f)
set_uniform(name : String, value : Bool)
set_uniform(name : String, value : Prism::Texture)
set_uniform
, start start, stop stop

Constructor methods inherited from class Prism::Shader::Program

new(file_name : String, &shader_reader : String -> String) new

Class methods inherited from class Prism::Shader::Program

pool pool

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def blend_factor=(value : Float32) #

Sets the value of the "blendFactor" uniform.


[View source]
def cube_map2=(value : Prism::TextureCubeMap) #

Sets the value of the "cubeMap2" uniform.


[View source]
def cube_map=(value : Prism::TextureCubeMap) #

Sets the value of the "cubeMap" uniform.


[View source]
def fog_color=(value : Prism::Maths::Vector3f) #

Sets the value of the "fogColor" uniform.


[View source]
def projection_matrix=(value : Prism::Maths::Matrix4f) #

Sets the value of the "projectionMatrix" uniform.


[View source]
def tick(tick : RenderLoop::Tick) #

Increase the skybox rotation each tick


[View source]
def view_matrix=(matrix : Matrix4f) #

Binds the view matrix to the shader. TRICKY: this disables the translation so that the view is always centered acround the camera.


[View source]