Jump to content
  • Advertisement
Sign in to follow this  
domin

PostProcess shader

This topic is 4236 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
- 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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!