From d058c30d02d32fd47f2a24c060fed6fb17bb736b Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Sat, 20 Feb 2021 00:01:43 +0100 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ engine_core/shaders/rect.frag | 0 engine_core/shaders/rect.vert | 22 ++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 README.md create mode 100644 engine_core/shaders/rect.frag create mode 100644 engine_core/shaders/rect.vert diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ce7f77 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +## USEFULL TOOLS + +- RHAI [(Embedded Scripting for Rust)](https://github.com/rhaiscript/rhai) +- GFX [(Low-level, cross-platform graphics and compute abstraction library)](https://github.com/gfx-rs/gfx) +- WINIT [(Cross-platform window creation and management)](https://github.com/rust-windowing/winit) +- RUSTTYPE [(Font lib)](https://gitlab.redox-os.org/redox-os/rusttype) +- SPECS [(Entity-Component System)](https://github.com/amethyst/specs) +- PAREEN [(Animation)](https://github.com/leod/pareen) + +## USEFULL LINK + +- https://arewegameyet.rs/ \ No newline at end of file diff --git a/engine_core/shaders/rect.frag b/engine_core/shaders/rect.frag new file mode 100644 index 0000000..e69de29 diff --git a/engine_core/shaders/rect.vert b/engine_core/shaders/rect.vert new file mode 100644 index 0000000..bb35717 --- /dev/null +++ b/engine_core/shaders/rect.vert @@ -0,0 +1,22 @@ +#version 150 core + +uniform sampler2D t_Awesome; +uniform int i_Switch; + +in vec4 v_Color; +in vec2 v_Uv; +out vec4 Target0; + +void main() { + vec3 aw = texture(t_Awesome, v_Uv).rgb; + + if(i_Switch == 0) { + if(aw == vec3(0.0, 0.0, 0.0)) { + Target0 = 0.20 * v_Color; + } else { + Target0 = vec4(aw, 1.0); + } + } else { + Target0 = v_Color; + } +} \ No newline at end of file