Using Nvidia's SDK effects?

Started by
0 comments, last by devronious 18 years, 3 months ago
I'm trying to use the halo effect. I've loaded it and have the following code to impliment it for a leaf that I'm drawing. But nothing happens except the system slows in performance...
[source lang=c#]
            this.device.SetTexture(0, this.GetSurfaceTexture("white").texture);

            Microsoft.DirectX.Direct3D.Effect effect = this.GetSurfaceEffect("halo").effect;
            effect.Technique = "Main";
            int passes = effect.Begin(0);
            for (int i = 0; i < passes; i++)
            {
                effect.BeginPass(i);
                this.GetSurfaceMesh("leaf01").mesh.DrawSubset(0);
                effect.EndPass();
            }
            effect.End();

            this.device.SetTexture(0, this.GetSurfaceTexture("white").texture);
            this.GetSurfaceMesh("leaf01").mesh.DrawSubset(0);

Any help is much appreciated, -Devin [/source]
Advertisement
Perhaps there is a book or article that explains the semantics and such for HLSL fx files?

This topic is closed to new replies.

Advertisement