wip things

This commit is contained in:
griffi-gh 2023-02-06 21:43:22 +01:00
parent aa4b552e0f
commit 1df8c89330
5 changed files with 21 additions and 0 deletions

View file

@ -9,6 +9,10 @@ uniform sampler2DArray tex;
void main() {
// base color from texture
color = texture(tex, vec3(v_uv, v_tex_index));
// discard fully transparent pixels
if (color.w <= 0.0) {
discard;
}
//basic "lighting"
float light = abs(v_normal.x) + .8 * abs(v_normal.y) + .6 * abs(v_normal.z);
color *= vec4(vec3(light), 1.);

1
kubi/src/gui.rs Normal file
View file

@ -0,0 +1 @@
//TODO

View file

View file

@ -31,6 +31,8 @@ pub(crate) mod block_placement;
pub(crate) mod delta_time;
pub(crate) mod cursor_lock;
pub(crate) mod control_flow;
pub(crate) mod state;
pub(crate) mod gui;
use world::{
init_game_world,

14
kubi/src/state.rs Normal file
View file

@ -0,0 +1,14 @@
use shipyard::Unique;
#[derive(Unique)]
pub enum GameState {
Connecting,
LoadingWorld,
InGame,
}
fn insert_default_state(
) {
}