Troubleshooting this Tutorial
Sometimes, even though you try hard to understand the information in a tutorial, things don't work out quite like you want it to. This page is here to help you resolve any problems you might be having with the tutorial on creating a reflection shader. The Common Mistakes section describes common problems that people have when doing the things in this tutorial, and how to resolve them. The Frequently Asked Questions section describes questions that people have that aren't related to mistakes, but rather, trying to understand the stuff better or exploring how it can be used.
If your problem or concern isn't addressed here, feel free to add a comment below, so that I know where you're having trouble. I like to keep these pages fairly clean, so I may remove comments that I felt like have been addressed. If I remove your comment and you don't feel like the problem has been fixed, repost the question and we'll take another look at it.
If a tutorial has a mistake in it, I will fix the mistake and reply to the comment with a brief explanation. However, after a couple of weeks I'll likely go back and remove the original comment as well as my reply, because, hopefully, the problem will have been fixed, and it won't be a concern any more.
None listed yet…
Frequently Asked Questions
Why am I getting just a black screen?
The most likely cause of this is because the file format that you are using, combined with the settings that you have chosen (or not—it may be the default settings that are doing it) end up in a situation where things just don't work, and you just get a black screen.
Partly, this goes back to the settings that were in use when you (or anyone) made the skybox image. If you made it, you can go back into the settings and change it. If you purchased the skybox image, or got it from my site, you might not have control over those settings.
At its root, the problem is that as of XNA 4.0, XNA likes to premultiply the alpha channel into the red, green, and blue channels (for some good reasons, admittedly)—that's the default. If your image already has premultiplied alpha values, or you don't want to use premultiplied alpha values in your game (which is our case, for this shader), you need to go in and change the setting on your skybox texture.
Here's how to do this:
1. Look at your Properties for the skybox image/environment map.