shader里部分float变量改为highp float,保证丝滑
(需要同时配合apk配置更新的gles版本为3.0)
This commit is contained in:
@@ -4,11 +4,11 @@ local shader=SHADER.aura
|
|||||||
local t
|
local t
|
||||||
|
|
||||||
function back.init()
|
function back.init()
|
||||||
t=math.random()*260
|
t=math.random()*2600
|
||||||
BG.resize(SCR.w,SCR.h)
|
BG.resize(SCR.w,SCR.h)
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=(t+dt)%2600
|
t=(t+dt)%6200
|
||||||
end
|
end
|
||||||
function back.draw()
|
function back.draw()
|
||||||
GC.clear(.08,.08,.084)
|
GC.clear(.08,.08,.084)
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ local shader=SHADER.grad1
|
|||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=math.random()*260
|
t=math.random()*2600
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=(t+dt)%2600
|
t=(t+dt)%6200
|
||||||
end
|
end
|
||||||
function back.draw()
|
function back.draw()
|
||||||
GC.clear(.08,.08,.084)
|
GC.clear(.08,.08,.084)
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ local shader=SHADER.grad2
|
|||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=math.random()*260
|
t=math.random()*2600
|
||||||
BG.resize(nil,SCR.h)
|
BG.resize(nil,SCR.h)
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=(t+dt)%2600
|
t=(t+dt)%6200
|
||||||
end
|
end
|
||||||
function back.draw()
|
function back.draw()
|
||||||
GC.clear(.08,.08,.084)
|
GC.clear(.08,.08,.084)
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ local shader=SHADER.rgb1
|
|||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=math.random()*260
|
t=math.random()*2600
|
||||||
BG.resize(SCR.w,SCR.h)
|
BG.resize(SCR.w,SCR.h)
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=(t+dt)%2600
|
t=(t+dt)%6200
|
||||||
end
|
end
|
||||||
function back.draw()
|
function back.draw()
|
||||||
GC.clear(.08,.08,.084)
|
GC.clear(.08,.08,.084)
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ local shader=SHADER.rgb2
|
|||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=math.random()*260
|
t=math.random()*2600
|
||||||
BG.resize(SCR.w,SCR.h)
|
BG.resize(SCR.w,SCR.h)
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=(t+dt)%2600
|
t=(t+dt)%6200
|
||||||
end
|
end
|
||||||
function back.draw()
|
function back.draw()
|
||||||
GC.clear(.08,.08,.084)
|
GC.clear(.08,.08,.084)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uniform float phase;
|
uniform highp float phase;
|
||||||
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
||||||
float x=scrCoord.x/love_ScreenSize.x;
|
float x=scrCoord.x/love_ScreenSize.x;
|
||||||
float y=scrCoord.y/love_ScreenSize.y;
|
float y=scrCoord.y/love_ScreenSize.y;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uniform float phase;
|
uniform highp float phase;
|
||||||
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
||||||
float x=scrCoord.x/love_ScreenSize.x;
|
float x=scrCoord.x/love_ScreenSize.x;
|
||||||
return vec4(
|
return vec4(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uniform float phase;
|
uniform highp float phase;
|
||||||
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
||||||
float y=scrCoord.y/love_ScreenSize.y;
|
float y=scrCoord.y/love_ScreenSize.y;
|
||||||
return vec4(
|
return vec4(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uniform float phase;
|
uniform highp float phase;
|
||||||
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
||||||
float x=scrCoord.x/love_ScreenSize.x;
|
float x=scrCoord.x/love_ScreenSize.x;
|
||||||
float y=scrCoord.y/love_ScreenSize.y;
|
float y=scrCoord.y/love_ScreenSize.y;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uniform float phase;
|
uniform highp float phase;
|
||||||
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
|
||||||
float x=scrCoord.x/love_ScreenSize.x;
|
float x=scrCoord.x/love_ScreenSize.x;
|
||||||
float y=scrCoord.y/love_ScreenSize.y;
|
float y=scrCoord.y/love_ScreenSize.y;
|
||||||
|
|||||||
Reference in New Issue
Block a user