Shader help: Passing a matrix into a shader?

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
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Shader help: Passing a matrix into a shader?

Post by Jasoco »

Okay, basically I'm trying to tweak my textured polygon shader (written by xXxMoNkEyMaNxXx and used by many here) to allow for color shading. I already have that working though. But what I want to do is have the option to dither the overlaying color. Basically having a matrix that is a table of 1s and 0s that the shader can grab from to determine whether to shade the current pixel with the overlaying color or just display the color as normal. I have no idea how to send a matrix/multi-dimensional table into a shader though.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Shader help: Passing a matrix into a shader?

Post by grump »

Jasoco wrote: Tue Nov 13, 2018 12:34 am Basically having a matrix that is a table of 1s and 0s that the shader can grab from to determine whether to shade the current pixel with the overlaying color or just display the color as normal.
A texture with alpha channel?
Post Reply

Who is online

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