Android shader on touch

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 shader on touch

Post by xNick1 »

Hi guys.
I couldn't really find an "easy" way to make a shader I need in opengl es.
It has to work on Android and iOS.
I need something like a "bubble" to appear in the touched spot.
Something like "hey, you tapped right here".

I don't really know where to start.
I used shine in the past but it doesn't work on mobile.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Android shader on touch

Post by s-ol »

It doesn't really sound like you need a shader at all. Just use love.touchpressed etc to draw a bubble?

If you want to do some displacement, then you can render your scene to a canvas and then draw the canvas with the shader attached. You will need externs (uniforms) to send information to the shader, it would make sense to send for example the x and y position and the radius as it increases over time using Shader:send.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 24 guests