Need some help with custom 2D lighting.

Hi,

I am working on a 2D game with an orthographic camera at the moment. A lot of the default lighting and post process options in Unreal don’t work with an orthographic camera. My solution was to just use unlit sprites and materials to compose a decent looking scene without lighting.
I have a scene with placeholder art set up and it looks kinda dull, lights and shadows would bring some interesting color dynamics into the scene. I played aroud with sprites as lights but a proper 2D light and shadow buffer would be great.

Here is an image of what I want to do (made in photoshop).](http://i.imgur.com/o7hdM2P.png)

Basically that is a sunlight that casts a shadow, my plan is to set up a light- and a shadow buffer and render the light information into those, then apply it to the scene texture.

My initial idea was using UProceduralMeshComponent and create triangle fan as light and use CustomDepth as shadow mask and apply it as PostProcess Blendable, but Custom Depth doesn’t seem to work on UProceduralMeshComponent (using version 4.9).

So I have a few questions going foward:

  1. Is there a way to enable CustomDepth and Stencil for UProceduralMeshComponent? That would be a quick and dirty hack for this.
  2. How can I render a triangle fan shadow mask into a texture using C++? Preferably the UProceduralMeshComponent triangle fan that I already have working.
  3. I am not very adept at writing render code in Unreal. How can I set up the renderer to take two additional textures (a light and a shadow map) and apply them to the final image?

I will dig into the renderer a bit, but I am pretty much starting at zero here. Any help would be really appreciated :slight_smile:

EDIT: In case my explanation wasn’t clear,here is a video of what I want to do (not made by me)