May be used in place of BlinnPhongProgram
for debugging or effect.
gamnit :: NormalProgram :: defaultinit
gamnit $ NormalProgram :: SELF
Type of this instance, automatically specialized in every classgamnit $ NormalProgram :: fragment_shader_source
Source code of the fragment shadergamnit :: BlinnPhongProgram :: alpha=
Scaling per vertexgamnit :: BlinnPhongProgram :: ambient_color=
Ambient colorgamnit :: GamnitProgram :: attributes
Attributes of this program organized by namegamnit :: GamnitProgram :: attributes=
Attributes of this program organized by namecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gamnit :: GamnitProgram :: compile_and_link
Compile the shaders, and this program, then link and report any errorsgamnit :: BlinnPhongProgram :: coord=
Vertices coordinatesgamnit :: NormalProgram :: defaultinit
gamnit :: GamnitProgram :: defaultinit
core :: Object :: defaultinit
gamnit :: GamnitProgram :: deleted=
Has this program been deleted?gamnit :: BlinnPhongProgram :: depth_texture
Diffuse texture unitgamnit :: BlinnPhongProgram :: depth_texture=
Diffuse texture unitgamnit :: BlinnPhongProgram :: depth_texture_size
Size, in pixels, ofdepth_texture
gamnit :: BlinnPhongProgram :: depth_texture_size=
Size, in pixels, ofdepth_texture
gamnit :: BlinnPhongProgram :: depth_texture_taps
Times to tap thedepth_texture
, square root (set to 3 for a total of 9 taps)
gamnit :: BlinnPhongProgram :: depth_texture_taps=
Times to tap thedepth_texture
, square root (set to 3 for a total of 9 taps)
gamnit :: GamnitProgram :: diagnose
Diagnose possible problems with the shaders of the programgamnit :: BlinnPhongProgram :: diffuse_color=
Diffuse colorgamnit :: GamnitProgram :: error=
Last error raised bycompile_and_link
gamnit :: GamnitProgram :: fragment_shader
Fragment shader to attach to this programgamnit :: GamnitProgramFromSource :: fragment_shader_source
Source code of the fragment shadercore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
gamnit :: BlinnPhongProgram :: light_center
Center position of the light or vector to parallel light sourcegamnit :: BlinnPhongProgram :: light_center=
Center position of the light or vector to parallel light sourcegamnit :: BlinnPhongProgram :: light_kind
Kind of lights: 0 -> no light, 1 -> parallel, 2 -> pointgamnit :: BlinnPhongProgram :: light_kind=
Kind of lights: 0 -> no light, 1 -> parallel, 2 -> pointgamnit :: BlinnPhongProgram :: light_mvp
Light model view projection matrixgamnit :: BlinnPhongProgram :: light_mvp=
Light model view projection matrixgamnit :: BlinnPhongProgram :: map_ambient=
Ambient texture unitgamnit :: BlinnPhongProgram :: map_bump=
Bump texture unitgamnit :: BlinnPhongProgram :: map_diffuse=
Diffuse texture unitgamnit :: BlinnPhongProgram :: map_specular
Specularity texture unitgamnit :: BlinnPhongProgram :: map_specular=
Specularity texture unitgamnit :: BlinnPhongProgram :: mvp=
Camera model view projection matrixgamnit :: BlinnPhongProgram :: normal=
Normal per vertexcore :: Object :: output_class_name
Display class name on stdout (debug only).gamnit :: BlinnPhongProgram :: rotation=
Setmat
at the uniform rotation matrix
gamnit :: BlinnPhongProgram :: rotation_row0=
Rotation matrix, row0gamnit :: BlinnPhongProgram :: rotation_row1
Rotation matrix, row 1gamnit :: BlinnPhongProgram :: rotation_row1=
Rotation matrix, row 1gamnit :: BlinnPhongProgram :: rotation_row2
Rotation matrix, row 2gamnit :: BlinnPhongProgram :: rotation_row2=
Rotation matrix, row 2gamnit :: BlinnPhongProgram :: rotation_row3
Rotation matrix, row 3gamnit :: BlinnPhongProgram :: rotation_row3=
Rotation matrix, row 3gamnit :: BlinnPhongProgram :: scale=
Scaling per vertexgamnit :: BlinnPhongProgram :: specular_color=
Specular colorgamnit :: BlinnPhongProgram :: tex_coord
Coordinates on the textures, per vertexgamnit :: BlinnPhongProgram :: tex_coord=
Coordinates on the textures, per vertexgamnit :: BlinnPhongProgram :: translation
Translation applied to each vertexgamnit :: BlinnPhongProgram :: translation=
Translation applied to each vertexgamnit :: GamnitProgram :: uniforms
Uniforms of this program organized by namegamnit :: GamnitProgram :: uniforms=
Uniforms of this program organized by namegamnit :: BlinnPhongProgram :: use_map_ambient
Should this program use the texturemap_ambient
?
gamnit :: BlinnPhongProgram :: use_map_ambient=
Should this program use the texturemap_ambient
?
gamnit :: BlinnPhongProgram :: use_map_bump
Should this program use the texturemap_bump
?
gamnit :: BlinnPhongProgram :: use_map_bump=
Should this program use the texturemap_bump
?
gamnit :: BlinnPhongProgram :: use_map_diffuse
Should this program use the texturemap_diffuse
?
gamnit :: BlinnPhongProgram :: use_map_diffuse=
Should this program use the texturemap_diffuse
?
gamnit :: BlinnPhongProgram :: use_map_specular
Should this program use the texturemap_specular
?
gamnit :: BlinnPhongProgram :: use_map_specular=
Should this program use the texturemap_specular
?
gamnit :: BlinnPhongProgram :: use_shadows
Should shadow be drawn? Would usedepth_texture
and light_mvp
.
gamnit :: BlinnPhongProgram :: use_shadows=
Should shadow be drawn? Would usedepth_texture
and light_mvp
.
gamnit :: GamnitProgram :: vertex_shader
Vertex shader to attach to this programgamnit :: GamnitProgramFromSource :: vertex_shader_source
Source code of the vertex shadergamnit :: GamnitProgramFromSource
Gamnit graphical program from the shaders source code
# Program to color objects from their normal vectors
#
# May be used in place of `BlinnPhongProgram` for debugging or effect.
class NormalProgram
super BlinnPhongProgram
redef var fragment_shader_source = """
precision mediump float;
// Input from the vertex shader
varying vec3 v_normal;
void main()
{
gl_FragColor = vec4(v_normal*0.5 + 0.5, 1.0);
}
""" @ glsl_fragment_shader
end
lib/gamnit/depth/more_materials.nit:642,1--659,3