Class: LiteRGSS::Shader

Inherits:
BlendMode show all
Defined in:
LiteRGSS.rb.yard.rb

Overview

Shader loaded applicable to a ShaderedSprite

Direct Known Subclasses

Shader

Constant Summary collapse

Fragment =

Define a Fragment shader

sf::Shader::Type::Fragment
Vertex =

Define a Vertex shader

sf::Shader::Type::Vertex
Geometry =

Define a Geometry shader

sf::Shader::Type::Geometry

Constants inherited from BlendMode

BlendMode::Add, BlendMode::DstAlpha, BlendMode::DstColor, BlendMode::One, BlendMode::OneMinusDstAlpha, BlendMode::OneMinusDstColor, BlendMode::OneMinusSrcAlpha, BlendMode::OneMinusSrcColor, BlendMode::ReverseSubtract, BlendMode::SrcAlpha, BlendMode::SrcColor, BlendMode::Subtract, BlendMode::Zero

Instance Attribute Summary

Attributes inherited from BlendMode

#alpha_dest_factor, #alpha_equation, #alpha_src_factor, #blend_type, #color_dest_factor, #color_equation, #color_src_factor

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(vertex_code, geometry_code, fragment_code)

Load a full shader from memory

Parameters:



896
897
898
# File 'LiteRGSS.rb.yard.rb', line 896

def self.new(fragment_code)

end

Instance Method Details

#load(vertex_code, geometry_code, fragment_code)

Load a full shader from memory

Parameters:



872
873
874
# File 'LiteRGSS.rb.yard.rb', line 872

def load(fragment_code)

end

#set_bool_uniform(name, uniform)

Set a Boolean type uniform

Parameters:

  • name (String)

    name of the uniform

  • uniform (Boolean, Array<Boolean>)

    Array must have 2, 3 or 4 Booleans



933
934
935
# File 'LiteRGSS.rb.yard.rb', line 933

def set_bool_uniform(name, uniform)

end

#set_float_array_uniform(name, uniform)

Set a Float Array type uniform

Parameters:

  • name (String)

    name of the uniform

  • uniform (Array<Float>)


951
952
953
# File 'LiteRGSS.rb.yard.rb', line 951

def set_float_array_uniform(name, uniform)

end

#set_float_uniform(name, uniform)

Set a Float type uniform

Parameters:



921
922
923
# File 'LiteRGSS.rb.yard.rb', line 921

def set_float_uniform(name, uniform)

end

#set_int_uniform(name, uniform)

Set a Integer type uniform

Parameters:

  • name (String)

    name of the uniform

  • uniform (Integer, Array<Integer>)

    Array must have 2, 3 or 4 Integers



927
928
929
# File 'LiteRGSS.rb.yard.rb', line 927

def set_int_uniform(name, uniform)

end

#set_matrix_uniform(name, uniform)

Set a Matrix type uniform (3x3 or 4x4)

Parameters:

  • name (String)

    name of the uniform

  • uniform (Array<Float>)

    Array must be 9 for 3x3 matrix or 16 for 4x4 matrix



945
946
947
# File 'LiteRGSS.rb.yard.rb', line 945

def set_matrix_uniform(name, uniform)

end

#set_texture_uniform(name, uniform)

Set a Texture type uniform

Parameters:

  • name (String)

    name of the uniform

  • uniform (LiteRGSS::Bitmap, nil)

    nil means sf::Shader::CurrentTexture



939
940
941
# File 'LiteRGSS.rb.yard.rb', line 939

def set_texture_uniform(name, uniform)

end