[SOLVED] Issue Rending Two Materials Over Each Other


I have been playing around with rendering recently and got stuck. I am trying to merge two effects I like to create a unique look for my game.

My goal is to make it feel like you are playing Legend of Zelda, Link to the Past on a CRT television, something like this:

What I have been trying so far is rendering one material on top of another.

On the lower level I am trying to render lights as seen in this post/project:

Then, over that I am trying to render the CRT effect from the horror-lofi project as seen in this post/project:

I have made some progress, currently both techniques are in the game (hitting tab will swap the render type).

Currently the first effect (Horror-Lofi) only works 50% of the time. Literally restarting the game without changing any code will sometimes cause it to work / not work.

The second effect (lighting) works and I am happy with it.

The third effect (mix of the two) does not work at all. I’ve tried several things such as creating a unique material. Rendering one material over the other. I even tried to write my own render script without much success. As close as I’ve gotten is just one or the other showing up.

Here is my project:
post_processing_mixed.zip (531.0 KB)

Any help would be greatly appreciated!

I was able to figure it out!

Turns out I was way over complicating things with my initial approach.

I simplified my solution down to one material (the multiply_quad). I edited the fragment program and the material to be able to handle both sets of input within one model.

As a result I was able to get the effect just the way I wanted it to be.



I’m extremely happy with how this turned out. If you’d like to see my solution fully implemented, here is the project for it:
post_processing_mixed_fixed.zip (530.4 KB)