Skip to main content
gamedev.net
🔒 Locked

Problem using nVidia effects

Started by GambitSnax 0 replies 750+ views
Original Post
GambitSnax
GambitSnax
I've been trying to port some of nVidia's effects that they provide in their 9.5 SDK straight into my application and have been having some trouble. I first tried the wood shader and it worked straight up, no problems at all. The two that I still haven't got working are the flame.fx which demonstrates a simple fire effect, and moscow_lava.fx which demonstrate a molten lava effect. Both of these effect run fine if I open them through nVidia's FX composer. I've two thoughts on why they might not be working properly. The first is that I'm not sure that the texture for each of the effect is loading correctly. When I left the effect files as is, I didn't seem to get an resemblance of an effect on my objects. The flame effect just rendered black, and the lava effect just rendered red. Both of the textures in these files use the automated loading functionality that looks like this -

texture bark : Diffuse
<
    string ResourceName = "bark.dds";
    string ResourceType = "2D";
>;

But when I manually loaded the desired texture in my application and set the texture in the effect, in my application, I started to see something. I'm still not sure that this is 100% correct as the effect still isn't working. With the flame effect now, it doesn't move in any way. And with the lava effect, I just get small clusters of red pixels that also don't move. This leads me to think that perhaps the time variable isn't being updated correctly, and the effects just think they are always in the first frame. The time variable within both effects looks like this -

float Time : TIME < string UIWidget = "none"; >;

and I've been setting it by passing in the complete elapsed time the application has been running as a float. I've also tried passing in the time between frames, and still don't get any movement. If anyone has had any experience using nVidia's effects before in their applications or if someone knows what might be wrong, I would appreciate any advice. Cheers.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.