diff options
author | chai <chaifix@163.com> | 2018-11-16 21:29:52 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-16 21:29:52 +0800 |
commit | a4db0e0622a3764d090a8c2ecf8bd5b56442ccef (patch) | |
tree | 7073a0bfb5dd7f83162fc62eb67d3c5a6168cf9e /bin/game | |
parent | 0056e468d9c3291443d87bfc05441e375a315433 (diff) |
*更新渲染minimal
Diffstat (limited to 'bin/game')
-rw-r--r-- | bin/game/main.lua | 8 |
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 |