I have been playing with these shaders:
and I have got these shaders up and working in my engine, with the exception of 3 and 4, they light my model correctly, but they don't seem to be rendering the cube map I am giving them.
The shader manages the cubemap like this:
texture EnvironmentMap
<
string type = "CUBE";
string name = "lobbycube.dds";
>;
samplerCUBE EnvironmentSampler = sampler_state
{
Texture = (EnvironmentMap);
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;
};
I load the cube map like this:
private
TextureCube myCube;myCube = myLoader.Load<TextureCube>("Content/Textures/SkyBox/RC/default_reflection");
This now loads fine. So I then pass the TextureCube param to the effect:
if
(myEffect.Parameters["EnvironmentMap"] != null)myEffect.Parameters["EnvironmentMap"].SetValue(myCube);
I have put a break on this and I know it is loading myCube into the paramter.
Unlike the other params I set this does not seem to be working, can anyone tell me where I am going wrong