shader里部分float变量改为highp float,保证丝滑

(需要同时配合apk配置更新的gles版本为3.0)
This commit is contained in:
MrZ_26
2022-09-11 05:42:54 +08:00
parent 76d985cc0f
commit 0fc7178589
10 changed files with 15 additions and 15 deletions

View File

@@ -4,11 +4,11 @@ local shader=SHADER.aura
local t
function back.init()
t=math.random()*260
t=math.random()*2600
BG.resize(SCR.w,SCR.h)
end
function back.update(dt)
t=(t+dt)%2600
t=(t+dt)%6200
end
function back.draw()
GC.clear(.08,.08,.084)

View File

@@ -4,10 +4,10 @@ local shader=SHADER.grad1
local t
function back.init()
t=math.random()*260
t=math.random()*2600
end
function back.update(dt)
t=(t+dt)%2600
t=(t+dt)%6200
end
function back.draw()
GC.clear(.08,.08,.084)

View File

@@ -4,11 +4,11 @@ local shader=SHADER.grad2
local t
function back.init()
t=math.random()*260
t=math.random()*2600
BG.resize(nil,SCR.h)
end
function back.update(dt)
t=(t+dt)%2600
t=(t+dt)%6200
end
function back.draw()
GC.clear(.08,.08,.084)

View File

@@ -4,11 +4,11 @@ local shader=SHADER.rgb1
local t
function back.init()
t=math.random()*260
t=math.random()*2600
BG.resize(SCR.w,SCR.h)
end
function back.update(dt)
t=(t+dt)%2600
t=(t+dt)%6200
end
function back.draw()
GC.clear(.08,.08,.084)

View File

@@ -4,11 +4,11 @@ local shader=SHADER.rgb2
local t
function back.init()
t=math.random()*260
t=math.random()*2600
BG.resize(SCR.w,SCR.h)
end
function back.update(dt)
t=(t+dt)%2600
t=(t+dt)%6200
end
function back.draw()
GC.clear(.08,.08,.084)

View File

@@ -1,4 +1,4 @@
uniform float phase;
uniform highp float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
float y=scrCoord.y/love_ScreenSize.y;

View File

@@ -1,4 +1,4 @@
uniform float phase;
uniform highp float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
return vec4(

View File

@@ -1,4 +1,4 @@
uniform float phase;
uniform highp float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float y=scrCoord.y/love_ScreenSize.y;
return vec4(

View File

@@ -1,4 +1,4 @@
uniform float phase;
uniform highp float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
float y=scrCoord.y/love_ScreenSize.y;

View File

@@ -1,4 +1,4 @@
uniform float phase;
uniform highp float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
float y=scrCoord.y/love_ScreenSize.y;