mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 16:28:42 -06:00
wip things
This commit is contained in:
parent
aa4b552e0f
commit
1df8c89330
|
@ -9,6 +9,10 @@ uniform sampler2DArray tex;
|
||||||
void main() {
|
void main() {
|
||||||
// base color from texture
|
// base color from texture
|
||||||
color = texture(tex, vec3(v_uv, v_tex_index));
|
color = texture(tex, vec3(v_uv, v_tex_index));
|
||||||
|
// discard fully transparent pixels
|
||||||
|
if (color.w <= 0.0) {
|
||||||
|
discard;
|
||||||
|
}
|
||||||
//basic "lighting"
|
//basic "lighting"
|
||||||
float light = abs(v_normal.x) + .8 * abs(v_normal.y) + .6 * abs(v_normal.z);
|
float light = abs(v_normal.x) + .8 * abs(v_normal.y) + .6 * abs(v_normal.z);
|
||||||
color *= vec4(vec3(light), 1.);
|
color *= vec4(vec3(light), 1.);
|
||||||
|
|
1
kubi/src/gui.rs
Normal file
1
kubi/src/gui.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
//TODO
|
0
kubi/src/gui/text_widget.rs
Normal file
0
kubi/src/gui/text_widget.rs
Normal file
|
@ -31,6 +31,8 @@ pub(crate) mod block_placement;
|
||||||
pub(crate) mod delta_time;
|
pub(crate) mod delta_time;
|
||||||
pub(crate) mod cursor_lock;
|
pub(crate) mod cursor_lock;
|
||||||
pub(crate) mod control_flow;
|
pub(crate) mod control_flow;
|
||||||
|
pub(crate) mod state;
|
||||||
|
pub(crate) mod gui;
|
||||||
|
|
||||||
use world::{
|
use world::{
|
||||||
init_game_world,
|
init_game_world,
|
||||||
|
|
14
kubi/src/state.rs
Normal file
14
kubi/src/state.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
use shipyard::Unique;
|
||||||
|
|
||||||
|
#[derive(Unique)]
|
||||||
|
pub enum GameState {
|
||||||
|
Connecting,
|
||||||
|
LoadingWorld,
|
||||||
|
InGame,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn insert_default_state(
|
||||||
|
|
||||||
|
) {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue