1
\$\begingroup\$

I decided to add to my game few trees, I already quake 3 model loader (md3) its for characters and method for texture drawing is store in *.ini file. I found a package of trees in MD3 and I have no problem with loading model alone, but there is a *.shader file and i have no idea how to load it to draw texture properly.

Tree pack: http://www.custommapmakers.org/wiki/index.php/Models:GR_Trees_set

I do not have to use exactly this format, I can write another loader, but trees in *.obj or .3ds look even harder

\$\endgroup\$
1
  • \$\begingroup\$ @EricB Quake 3 shader files are something else.. \$\endgroup\$ Commented Nov 26, 2012 at 6:40

1 Answer 1

1
\$\begingroup\$

The quake 3 "shader" is basically just a description of the rendering parameters, and has little or nothing to do with opengl shaders. Here's an example from your tree package:

models/mapobjects/GR_trees/tree6
{
    cull none
    nopicmip

    {
        map models/mapobjects/GR_trees/tree6.tga
        alphaFunc GE128
        depthWrite
        rgbGen vertex
    }
}

Many of the things listed there are pretty obvious - disable clipping, use tree6.tga as texture, have depth write enabled.. as for the rest, you might want to look up the reference:

http://toolz.nexuizninjaz.com/shader/

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.