Sign in to follow this  
mysockshurt

A directx attempt and fail

Recommended Posts

A friend of mine used the website directxtutorial.com for some time and they offered a pay membership thing. He payed and I saw some of the shader code for it. The problem I have is in use of said shader code(I don't think I can post it because its payed for, also this was just a test to see if my directx linking worked and I chose an arbitrary way to test it). It compiles fine , but when executed I get a black screen(It should be a black screen with a teapot in it) and ether my mouse pointer or a load circle(running vista). This happened to him to so I decided to see what could be done. These were the steps I took 1) used the source code in a blank win32 project 2) copied the shader code from the website. 3) put the shader in notepad and saved it as a .fx file( I save it under all files and ansi encoding(Or should it be another encoding)) 4)I copied it and place it into the project folder, in the correct directory. 5 ) I built the source code and it ran fine and then when it executes I get the black screen. (I copied the shader exactly as it was on his website). This is really starting bother me and my friend that all of the shader tutorials are doing this, any advice? Is it note pad which is the problem? I don't think I can post the source code. Thanks

Share this post


Link to post
Share on other sites
Shader code is written with a specific application in mind. You say that you are using the shader code, but if you are using it in a different application, you'll probably need to make some adjustments.

That said, it's very difficult to guess what's the problem because there are many things that can go wrong. If you have access to the original program that used the shader, try comparing it to your program and see if you are doing something differently.

Also, there's plenty of shader code that can be found freely on the internet. There's really no need to pay for it.

Share this post


Link to post
Share on other sites
Do you think it would be smarter to hope from a reply from the guy who made it because in essence if you can't see the code , it's like asking a mechanic to fix a engine problem with out seeing or touching the inside. The only thing I can give is it uses simple.fx as the shader. Can I pm it to someone or is that still giving it all away.

Share this post


Link to post
Share on other sites
Are you applying the shader to the teapot when you render it? Are you sure you understand what a shader is? It's really impossible for anyone to help without seeing some of the code. Why don't you post just the segment of code for rendering the teapot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this