Tuesday, February 2, 2010

Approach the Shaders with Caution

I have never written a shader before, so the rendering part of this project has me a little on edge. But then I found this tutorial (kind of outdated, but still decent) about how to generate fur shaders using DirectX Effect files (.fx). I was happy to get some of the tutorial code to compile and run. Now I have several resources showing me how to plug shaders into a framework. In fact, that's what confuses me most about shaders; I'm not sure how they're supposed to fit into my current code base. Since I am using OpenGL to render things in my scene at the moment, I'm guessing I should look into (O)GLSL. This tutorial looks like it might be helpful (now if I could just get the example code to compile on my computer...).

1 comment:

  1. I personally like CG
    but its just since I am comfortable using it
    you don't have to use a shader
    it would just be slower
    I usually test things in serial first...
    and I recomend this
    unless you absolutely need to go down the GPU route
    is it slower ... yes
    but it proves it works
    than I port my algorthim to the GPU
    to get performance gain

    so I sugguest doing the same here

    ReplyDelete