Sign in to follow this  
domin

PostProcess shader

Recommended Posts

domin    130
Ok, here is the situation - I have running space combat game - now, for make aiming easier I have added post processing shader that makes everything black and white... So far so good, but now comes harder part - all enemies flying around should be displayed in red (in opposite to all other in BW). And the question is - how to determine in post process pixel shader which pixel should be painted in grey scale and which i red scale? Thanks for any tips and etc.

Share this post


Link to post
Share on other sites
S1CA    1418
- Perhaps doing this as an extra pass on a per-object-process instead of a whole screen post-process would be more appropriate?

- Perhaps you could use the alpha channel of the render target texture used as the source for your post process shader to store a friend/enemy value (0=friendly, 1=bad)?

- Perhaps you could use the stencil buffer to store the same friend/enemy value as above and then split your post process into 2 passes: grey pass (grey post process shader runs for pixels that aren't set in the stencil), red pass (red post process shader runs for pixels that are set in the stencil).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this