Android shaders

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
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Android shaders

Post by xNick1 »

Hi guys.
I'd like to use a shader to make the scene look more vivid on android.
I tried shine some time ago and it worked well on my pc.
However since android uses opengl es instead of opengl, it crashed on my device.

How do I write a shader for android?
Are there any premade shaders I can try?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Android shaders

Post by raidho36 »

Check out the GL ES specs. It's a lot like desktop GL except more stringent, some things that would work on the desktop wouldn't pass on mobile.
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Android shaders

Post by xNick1 »

Got it.
I'll try asap!
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Android shaders

Post by xNick1 »

Do Android shaders work on pc?
Or I have to deploy on Android every time?

I read that if you write opengl es, it works on opengl too.
So I can just write opengl es and it'll work everywhere.
Can you confirm that?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Android shaders

Post by raidho36 »

GL ES is a subset of OpenGL so yes it works on PC.
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Android shaders

Post by xNick1 »

Nice. I managed to write what I needed and it's working. Just a little worried about it crashing on some old Android devices. I put a setting to disable shaders just in case.
Thank you
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 190 guests