Single pass material for diffuse + fullbright?

Problems building or running the engine, queries about how to use features etc.

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
            }
SufferinPup
Greenskin
 
Posts: 104
Kudos: 0
Joined: 02 Mar 2010

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...
User avatar
LiMuBei
Goblin
 
Posts: 297
Kudos: 9
Joined: 09 Jun 2008
Location: Karlsruhe, Germany


Return to Help

Who is online

Users browsing this forum: No registered users and 5 guests