Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

enter image description here

Since the concept was difficult to explain in words for someone who's not quite familiar with shader, I described it in pictures.

I'm currently using Unity and it seems Shaderlab is the best choice to accomplish this.

To shader masters, this seems like quite a simple trick, but as beginner, I've been struggling to find right keywords and tutorials to accomplish this.

I wish someone could explain the concept behind this shader trick.

Thank you in advance.

share|improve this question
1  
I think you can skip some of the textures, like "Black", which looks like an uniform color, or the "Character (dark)" which isn't needed since you can get this information from the characters alpha-channel. –  bummzack Nov 27 '13 at 8:08
add comment

1 Answer

up vote 1 down vote accepted

The technique is called masking. Alpha is used as a mask to calculate how much of the original pixel's color gets in to the final image.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.