Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Garbeld

Pages: [1]
1
Graphics / Multiple layers and colorizing thereof
« on: December 14, 2012, 09:54:32 pm »
I have a variable length array of largeish (probably 640x480, enough to fill the app's window) images, from which I will take 5 (henceforth "layers") and draw them in order.
Each image is greyscale, and layer 2 will be drawn without change; layers 0,1,3,4 will be colorized and transparent (pixels will be rendered as red in layers 0,1, and blue in layers 3,4, in proportion to how dark they are).

I'm going to be drawing a lot of images (again, all greyscale) to layer 2, with frequent scale and rotation shifts; thus, I assume that it would be fastest and easiest (fewest lines of code, and not having to learn unfamiliar functions and/or math) for these layers to be rendertextures and drawing on layer 2 to be done with sprites. Assuming colorizing the layers is simple enough, then everything's basically solved and done. However, I'm not sure what the best way to go about that would be.

I'm guessing that the "correct" answer would involve shaders, but I'm not terribly familiar with them (or graphics cards, openGL, anything like that). A cursory search for shader tutorials didn't help me much.

Pages: [1]
anything