Jump to content

Home

Shader question


Garland

Recommended Posts

In a map I'm trying to make, I'm trying to make everything look as though it has a high quality sheen. Sadly, I don't want to try and make everything reflective and thus bog down the system needlessly.

 

I'm not sure about the technical term for this effect, but I'm wanting to make a faux environment map. Have a shader with the top texture (are they called layers or just texture passes?) alpha blended to look like a gloss, but move depending on the player's perspective.

 

Kind of like a sky texture, but I only want it applied to layer/pass in the shader. so the rest of the texture stays static and the "gloss" layer has the perspective effect.

 

That's about the best I can describe it, since I don't know the technical term for it. Sorry if it doesn't make sense. Hehe.

 

-Garland

Link to comment
Share on other sites

Hm, imo, environment maps suck in q3 engine. If I understand you correctly you don't want real reflection.

 

So, a shader might look smth like this:

path/texture
{
    {
         map $lightmap
     }
    {
         map path/texture
         blendFunc GL_DST_COLOR GL_ZERO
     }
     {
        //this is where your sky goes
         map path/texture2
         blendFunc GL_ONE GL_ONE
         tcGen environment
     }
}

 

Be warned, results may be ugly :D

Link to comment
Share on other sites

Heh, I should have figured to environment map I'd end up using the "environment" portion of the code.. didn't know the command for it though.

 

tcGen enviroment, eh? Might be ugly, but I'll be able to put it onto a few more surfaces than reflection.

 

Might end up being ugly, but I'll see if I can't make it look half decent. ;):D

 

Thanks for the help you two!

 

-Garland

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...