Single pass material for diffuse + fullbright?

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

Single pass material for diffuse + fullbright?

Postby SufferinPup » Sat Feb 25, 2012 7:47 pm

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
            }
0 x

User avatar
LiMuBei
Goblin
Posts: 297
Joined: Mon Jun 09, 2008 3:56 pm
Location: Karlsruhe, Germany

Re: Single pass material for diffuse + fullbright?

Postby LiMuBei » Sun Feb 26, 2012 2:09 pm

Maybe colour_op_ex will help you? Using blend_texture_alpha or something...
0 x


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 2 guests