Advertisement

Game collectible highlighting

Started by July 12, 2018 07:59 PM
2 comments, last by NubDevice 6 years, 1 month ago

Games often highlight collectibles with halos or in the case of Wolfenstein with a cycling white stripe.  Its hard to see here with a still image but picture the white stripe moving across the object texture. I assume its done in the collectible's shader code and perhaps its much more simple than I thought but am I on the right track here?

(images from "Wolfenstein New Colossus")

collectible_highlight2.PNG.0fcabb1fde26bc8a31c4ae4f41e3f7c1.PNGcollectible_highlight.PNG.a52fec10dc85204b5ac41ed6aeb7f036.PNG

Yes, this is done in a shader.  This can be one in any number of ways, but I've done something similar by testing the fragment's world position against a value and calculating a color to mix in the with sampled texture.  All you need to do at that point is to sweep the position you're comparing to over the object over a number of frames.

To know how exactly it's done in any particular game or how it could be done in your game, more information would need to be known.

Advertisement

Judging from the second image, the white stripe on the collectibles appears a hard horizontal to the screen suggesting a stencil and full screen pass with the animated stripe.

This topic is closed to new replies.

Advertisement