Page 1 of 1

Single pass material for diffuse + fullbright?

Posted: Sat Feb 25, 2012 7:47 pm
by SufferinPup
I'm trying to figure out a way to set up a .material file so there are 2 texture units, one is a standard diffuse texture multiplied by vertex color (so it gets vertex lighting), and the 2nd pass just replaces the colors of the first pass based on its own alpha values. This is for something like a lantern, where the bright parts of the lantern are fullbright but otherwise it is correctly lit by the surrounding lights.

Here is where I started, but I can't seem to figure out what to put for the alpha_op_ex in the 2nd texture stage so it only uses the alpha of the 2nd texture for itself and not for the final pixel.

Code: Select all

            texture_unit
            {
                texture prop_bread_DM.tga 
            }
            texture_unit
            {
                colour_op replace
               texture bread_test.tga
            }

Re: Single pass material for diffuse + fullbright?

Posted: Sun Feb 26, 2012 2:09 pm
by LiMuBei
Maybe colour_op_ex will help you? Using blend_texture_alpha or something...