diff --git a/examples/draw_shader_include.rs b/examples/draw_shader_include.rs deleted file mode 100644 index e192cb27..00000000 --- a/examples/draw_shader_include.rs +++ /dev/null @@ -1,41 +0,0 @@ -use notan::draw::*; -use notan::prelude::*; - -#[derive(AppState)] -struct State { - texture: Texture, - pipeline: Pipeline, -} - -#[notan_main] -fn main() -> Result<(), String> { - notan::init_with(init) - .add_config(DrawConfig) - .draw(draw) - .build() -} - -fn init(gfx: &mut Graphics) -> State { - let texture = gfx - .create_texture() - .from_image(include_bytes!("assets/ferris.png")) - .build() - .unwrap(); - - const FRAGMENT: ShaderSource = - notan::include_fragment_shader!("examples/shaders/draw_shader_include.glsl"); - let pipeline = create_image_pipeline(gfx, Some(&FRAGMENT)).unwrap(); - - State { texture, pipeline } -} - -fn draw(gfx: &mut Graphics, state: &mut State) { - let mut draw = gfx.create_draw(); - draw.clear(Color::BLACK); - - draw.image_pipeline().pipeline(&state.pipeline); - draw.image(&state.texture).position(250.0, 200.0); - draw.image_pipeline().remove(); - - gfx.render(&draw); -} diff --git a/examples/shaders/draw_shader_include.glsl b/examples/shaders/draw_shader_include.glsl deleted file mode 100644 index c4edeac1..00000000 --- a/examples/shaders/draw_shader_include.glsl +++ /dev/null @@ -1,16 +0,0 @@ -#version 450 -precision mediump float; -layout(location = 0) in vec2 v_uvs; -layout(binding = 0) uniform sampler2D u_texture; -layout(location = 0) out vec4 color; - -#include "pixelize.glsl" -// OR -// #include - -void main() { - vec2 uv = v_uvs; - uv = pixelize(uv, 32.); - - color = texture(u_texture, uv); -} diff --git a/examples/shaders/pixelize.glsl b/examples/shaders/pixelize.glsl deleted file mode 100644 index 0ba53805..00000000 --- a/examples/shaders/pixelize.glsl +++ /dev/null @@ -1,3 +0,0 @@ -vec2 pixelize(vec2 uv, float size) { - return (floor(uv * size) + 0.5) / size; -}