medfall

A super great game engine
Log | Files | Refs

commit edd75bba41bf5fcbd8175b1c1473e830da54adf5
parent 02cdd37208245b9a48921cf97591d7352005cc41
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Jul  8 16:39:38 +0300

SHIT -> UI

Diffstat:
hm.cc | 2+-
shaders.cc | 2+-
shaders.h | 2+-
shaders/shit.glsl | 23-----------------------
shaders/ui.glsl | 23+++++++++++++++++++++++
5 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/hm.cc b/hm.cc @@ -218,7 +218,7 @@ GAME_FRAME( game_frame ) { } RenderState immediate_render_state; - immediate_render_state.shader = get_shader( SHADER_SHIT ); + immediate_render_state.shader = get_shader( SHADER_UI ); immediate_render_state.depth_func = DEPTHFUNC_DISABLED; immediate_render( &game->test_immediate, immediate_render_state ); diff --git a/shaders.cc b/shaders.cc @@ -36,7 +36,7 @@ void shaders_init() { shaders[ SHADER_FLAT_TEXTURED ].path = "shaders/flat_textured.glsl"; shaders[ SHADER_FLAT_TEXTURED ].texture_uniform_names[ 0 ] = "tex"; - shaders[ SHADER_SHIT ].path = "shaders/shit.glsl"; + shaders[ SHADER_UI ].path = "shaders/ui.glsl"; shaders[ SHADER_TREE ].path = "shaders/tree.glsl"; diff --git a/shaders.h b/shaders.h @@ -7,7 +7,7 @@ enum ShaderID { SHADER_SKYBOX, SHADER_FLAT_VERTEX_COLOURS, SHADER_FLAT_TEXTURED, - SHADER_SHIT, + SHADER_UI, SHADER_TREE, SHADER_TERRAIN, SHADER_WRITE_SHADOW_MAP, diff --git a/shaders/shit.glsl b/shaders/shit.glsl @@ -1,23 +0,0 @@ -#ifdef VERTEX_SHADER - -in vec3 position; -in vec3 colour; - -out vec3 frag_colour; - -void main() { - gl_Position = vec4( position, 1.0 ); - frag_colour = colour; -} - -#else - -in vec3 frag_colour; - -out vec4 screen_colour; - -void main() { - screen_colour = vec4( frag_colour, 1.0 ); -} - -#endif diff --git a/shaders/ui.glsl b/shaders/ui.glsl @@ -0,0 +1,23 @@ +#ifdef VERTEX_SHADER + +in vec3 position; +in vec3 colour; + +out vec3 frag_colour; + +void main() { + gl_Position = vec4( position, 1.0 ); + frag_colour = colour; +} + +#else + +in vec3 frag_colour; + +out vec4 screen_colour; + +void main() { + screen_colour = vec4( frag_colour, 1.0 ); +} + +#endif