Original Post
Hi guys! First, execuse me if you cannot understand because of my bad English. I'm working on dynamic cube mapping. I've looked at DX SDK's HDRCubeMap sample and updated its code to have ability to move the reflective model; but I saw that when I moved it, reflection didn't change. Now I'm using a technique. When I accessed cubemap's face and before start rendering to this surface, I move the objects which will be rendered by changing their World Matrices' m41, m42 and m43 elements.
Vector3 Pos = ReflectiveObjectWorldPosition;
For each object which will be rendered to cubemap's active surface
{
object.WorldMatrix._41 -= Pos.x;
object.WorldMatrix._42 -= Pos.y;
object.WorldMatrix._43 -= Pos.z;
render this object to active surface;
}
next object And I got (I think)nice results: Scene1 Scene2 Scene3 Scene4 You see that the reflection on the skull mesh is fully dynamic but I think that my technique isn't an absolute technique. Because, I couldn't succeed to find right "moving" value. I mean, the value I used above gave me some nice results on "curved" surfaces but didn't on "flat surfaces". I've read a topic here says that Inverse (I'm not sure, maybe Transpose) of View Matrix could be used. But I couldn't understand it. Are there anyone knows this or any other method(s)? Best Regards, Rohat.