Moonshine problem on some mobile devices

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Akusoff
Prole
Posts: 4
Joined: Tue Jul 10, 2018 7:38 pm

Moonshine problem on some mobile devices

Post by Akusoff » Fri Jul 13, 2018 8:06 pm

I write my game with moonshine library to make old film effect using boxblur and vignette. It works great on the computer but It doesn't on some android devices(Start Gamedev 170112). Game was successfuly installed and run on my android 7.1.2(Lineage OS) but other devices refused to run showing something like that. Image

I know about differences between GLSL and GLSL ES but why my smartphone runs this game without any errors?

Any guesses?

Akusoff
Prole
Posts: 4
Joined: Tue Jul 10, 2018 7:38 pm

Re: Moonshine problem on some mobile devices

Post by Akusoff » Fri Jul 13, 2018 9:35 pm

Well. I've rewritten vignette effect code from this:
extern number radius;
extern number softness;
extern number opacity;
extern vec4 color;
vec4 effect(vec4 c, Image tex, vec2 tc, vec2 _)
{
number aspect = love_ScreenSize.x / love_ScreenSize.y;
aspect = max(aspect, 1.0 / aspect); // use different aspect when in portrait mode
number v = 1.0 - smoothstep(radius, radius-softness,
length((tc - vec2(0.5f)) * aspect));
return mix(Texel(tex, tc), color, v*opacity);
}
to this:
extern number radius;
extern number softness;
extern number opacity;
extern vec4 color;

vec4 effect(vec4 c, Image tex, vec2 tc, vec2 _)
{
number aspect = love_ScreenSize.x / love_ScreenSize.y;
aspect = max(aspect, 1.0 / aspect); // use different aspect when in portrait mode
return mix(Texel(tex, tc), color, (1.0 - smoothstep(radius, radius-softness, length((tc - vec2(0.5)) * aspect)))*opacity);
}
So when I use only vignette game works fine on other android devices, but I don't know how to rewrite boxblur code to make it work:
extern vec2 direction;
extern number radius;
vec4 c = vec4(0.0);
vec4 effect(vec4 color, Image texture, vec2 tc, vec2 _) {

for (float i = -radius; i <= radius; i += 1.0)
{
c += Texel(texture, tc + i * direction);
}
return c / (2.0 * radius + 1.0) * color;
}

Post Reply

Who is online

Users browsing this forum: Rickton and 4 guests