Advertisement Jump to content
Sign in to follow this  
ReaVeR-Andrey

Shaders and Effects

This topic is 4933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Question1. How do I load and run HLSL shaders without effects? Question2. How do I load and run effects? (I have the effect buffer I got from D3DXLoadMeshFromXof)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by ReaVeR-Andrey
Question1.
How do I load and run HLSL shaders without effects?


This article describes the process adequately. You will end up depending on D3DX for a lot of your work anyway, so there is little reason not to use effects. Without effects, you will find yourself writing a wrapper around ID3DXConstantTable anyway because the process of setting constants is such a pain.

Quote:
Original post by ReaVeR-Andrey
Question2.
How do I load and run effects? (I have the effect buffer I got from D3DXLoadMeshFromXof)


The process is well documented in the DirectX SDK. You use D3DXCreateEffect* to load your effect, set your constants, set the pass and begin rendering. It is very straightforward and easy to use.

Now what were you talking about using D3DXLoadMeshFromXof? That is not the correct function call for this situation. Sorry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!