Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question
    
@EricB Quake 3 shader files are something else.. –  Jari Komppa Nov 26 '12 at 6:40
add comment

1 Answer

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/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.