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 » Mon Aug 06, 2018 12:08 am

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
Citizen
Posts: 81
Joined: Sun Feb 14, 2016 1:13 pm

Re: How to make a gradient across multiple

Post by steVeRoll » Thu Aug 09, 2018 6:04 pm

I guess you could draw the text to a canvas, and apply the shader to that.

User avatar
raidho36
Party member
Posts: 1685
Joined: Mon Jun 17, 2013 12:00 pm

Re: How to make a gradient across multiple

Post by raidho36 » Fri Aug 10, 2018 5:35 pm

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: No registered users and 5 guests