[Solved] Help with shaders in 11.3

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
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

[Solved] Help with shaders in 11.3

Post by alberto_lara »

Hi guys, it's been a while since I used LÖVE and I know that for recent versions some changes affected, among other things, how shaders work/are used but I've been looking at this section of the forum, looking at the docs and even googling for solutions, with no luck so far on finding the trick to make this work.

I'm getting this error:
Image

when using this shader

I know this shader works because I used it with a game I was creating for 0.10.2 (and never finished it)

Thanks in advance.
Last edited by alberto_lara on Sat Apr 25, 2020 1:28 am, edited 1 time in total.
User avatar
pgimeno
Party member
Posts: 3640
Joined: Sun Oct 18, 2015 2:58 pm

Re: Help with shaders in 11.3

Post by pgimeno »

_tex0_ seems to be an internal uniform variable that is now gone. No idea what it meant, but the shader credits slime so maybe he knows.
nameless tee
Prole
Posts: 15
Joined: Mon Apr 22, 2019 8:16 am

Re: Help with shaders in 11.3

Post by nameless tee »

Looks like the name of _tex0_ changed. Adding the following line did the trick:

Code: Select all

uniform vec2 inputSize;
uniform vec2 outputSize;
uniform vec2 textureSize;

#define _tex0_ MainTex // <-

#define SCANLINES
I just took a guess at what inputs the shader needs to get something to show up on the screen, so the way I'm using the shader is probably not correct.
screenshot.png
screenshot.png (621.97 KiB) Viewed 2854 times
EDIT: Forgot to mention that the use of "extern" is deprecated. That's why I changed it to "uniform".
Attachments
tex0.love
(49.85 KiB) Downloaded 115 times
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: Help with shaders in 11.3

Post by alberto_lara »

Code: Select all

#define _tex0_ MainTex
did the trick, thanks a lot!
Post Reply

Who is online

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