summaryrefslogtreecommitdiff
path: root/demo/ScreenQuad.lua
diff options
context:
space:
mode:
Diffstat (limited to 'demo/ScreenQuad.lua')
-rw-r--r--demo/ScreenQuad.lua49
1 files changed, 0 insertions, 49 deletions
diff --git a/demo/ScreenQuad.lua b/demo/ScreenQuad.lua
deleted file mode 100644
index 73cce46..0000000
--- a/demo/ScreenQuad.lua
+++ /dev/null
@@ -1,49 +0,0 @@
-local ScreenQuad = {}
-
-ScreenQuad.quad = honey.primitives.plane(2,2)
-
-local vertexShader = [[
-#version 330 core
-
-layout(location = 0) in vec3 position;
-layout(location = 1) in vec3 normal;
-layout(location = 2) in vec2 uv;
-
-out vec2 UV;
-
-void main()
-{
- gl_Position = vec4(position.xy, 0, 1) - vec4(1,1,0,0);
- UV = uv;
-} ]]
-
-local fragmentShader = [[
-#version 330 core
-
-in vec2 UV;
-
-uniform sampler2D tex;
-
-out vec4 color;
-
-void main()
-{
- color = vec4(texture(tex, UV).xyz, 1);
-} ]]
-
-ScreenQuad.shader = honey.shader(vertexShader, fragmentShader)
-
-ScreenQuad.tex = honey.texture.new()
-ScreenQuad.depth = honey.texture.new()
-ScreenQuad.tex:create('rgb', 640, 480)
-ScreenQuad.depth:create('depth', 640, 480)
---honey.texture.load(ScreenQuad.texture, 'checkerboard.png', false)
-
-ScreenQuad.fb = honey.texture.new_framebuffer(ScreenQuad.tex, ScreenQuad.depth, 640, 480)
-
-ScreenQuad.draw = function(self)
- honey.texture.use(self.tex, 0)
- honey.mesh.draw(self.quad, self.shader)
-end
-
-return ScreenQuad