Single pass material for diffuse + fullbright?

Problems building or running the engine, queries about how to use features etc.
Post Reply
SufferinPup
Greenskin
Posts: 119
Joined: Tue Mar 02, 2010 11:09 pm
x 2

Single pass material for diffuse + fullbright?

Post 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
            }
User avatar
LiMuBei
Goblin
Posts: 297
Joined: Mon Jun 09, 2008 3:56 pm
Location: Karlsruhe, Germany
x 10

Re: Single pass material for diffuse + fullbright?

Post by LiMuBei »

Maybe colour_op_ex will help you? Using blend_texture_alpha or something...
Post Reply