aboutsummaryrefslogtreecommitdiff
path: root/bin/game/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bin/game/main.lua')
-rw-r--r--bin/game/main.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/game/main.lua b/bin/game/main.lua
index ce22f46..ca260d7 100644
--- a/bin/game/main.lua
+++ b/bin/game/main.lua
@@ -24,6 +24,8 @@ Vertex vert(Vertex v)
#FRAGMENT_SHADER
Color frag(Color col, Texture tex, Vertex v)
{
+ if(v.xy.x > 30)
+ return Color(1, 0, 0, 1);
Color c = texel(tex, v.uv);
return c;
}
@@ -40,7 +42,7 @@ local spr = nil
local bitmap = nil
function jin.core.onLoad()
bitmap = jin.graphics.newBitmap(128, 128, function(w, h, x, y)
- return {255*math.sin(x/w),255 - 255*math.cos(y/w),0,255}
+ return {255*math.sin(x/w),255 - 255,255*math.cos(y/w),255}
end)
shader_program = jin.graphics.newShader(shader)
shader_program2 = jin.graphics.newShader(shader2)
@@ -69,8 +71,8 @@ function jin.core.onLoad()
--timer:cancel(h)
end, h)
jin.graphics.pushMatrix()
- --jin.graphics.translate(100, 0)
- jin.graphics.rotate(0.2)
+ jin.graphics.translate(10, 0)
+ --jin.graphics.rotate(0.2)
end
local stop = false