Class: Mittsu::OpenGLMeshLambertMaterial
Instance Attribute Summary
#shader, #shadow_pass, #uniforms_list
Instance Method Summary
collapse
#clear_custom_attributes, #custom_attributes_dirty?, #init, #initialize, #needs_camera_position_uniform?, #needs_face_normals?, #set
Instance Method Details
#init_shader ⇒ Object
21
22
23
|
# File 'lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb', line 21
def init_shader
@shader = ShaderLib.create_shader(shader_id)
end
|
#needs_lights? ⇒ Boolean
17
18
19
|
# File 'lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb', line 17
def needs_lights?
true
end
|
13
14
15
|
# File 'lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb', line 13
def needs_view_matrix_uniform?
true
end
|
3
4
5
6
7
8
9
10
11
|
# File 'lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb', line 3
def refresh_uniforms(uniforms)
super
uniforms['emissive'].value = @material.emissive
if @material.wrap_around
uniforms['wrapRGB'].value.copy(@material.wrap_rgb)
end
end
|
#shader_id ⇒ Object
25
26
27
|
# File 'lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb', line 25
def shader_id
:lambert
end
|