How to make a gradient across multiple

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
themerone
Prole
Posts: 1
Joined: Sun Aug 05, 2018 11:59 pm

How to make a gradient across multiple

Post by themerone »

How can I apply a gradient shader across multiple characters of text?

It seems that Love renders each glyph to a separate texture which makes this very difficult. Is there a workaround?
User avatar
steVeRoll
Party member
Posts: 131
Joined: Sun Feb 14, 2016 1:13 pm

Re: How to make a gradient across multiple

Post by steVeRoll »

I guess you could draw the text to a canvas, and apply the shader to that.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: How to make a gradient across multiple

Post by raidho36 »

An on-screen pixel coordinate is passed into the shader function. You can leverage it to make such effects.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 43 guests