   Stencil buffer question
  Hi,I'm kind of new to stencil buffers, and I was wondering if it's possible to render an object like so...On first pass: with a black and white coloured texture, making the white parts the 'stencil mask' (I'm not sure of the terminology)Then on second pass: with a grass texture only at the 'white parts' / 'stencil mask'.When I tried that, the object shows up with 100% grass texture.Here are my settings that I was using (these settings were from a previous tutorial)...Pass1:stencil-test (true)stencil-func (func=always, ref=1, mask=1)stencil-op (sfail=keep, dpfail=keep, dppass=replace)Pass2:stencil-test (true)stencil-func (func=equal, ref=1, mask=1)stencil-op (sfail=keep, dpfail=keep, dppass=keep)Thanks.Note: I am not really sure what I'm doing, I am still reading up on this, but I just wanted to get this working.   
  I think the stencil buffer doesn't take into account the color of a fragment but rather whether it was drawn or not, in your case, it doesn't matter that you're drawing black or white pixels, they all get set to 1 in the stencil mask... but I am just guessing here.You may find some answers here.;  Thanks, I should have looked there in the first place.   ;  No problem.   