This module is based on a fast, iterative approximation method to obtain the point hit by a reflection or refraction ray. The calculation uses the distance impostors storing distance values in environment map texels. This approximation is used to localize environment mapped reflections and refractions, that is, to make them dependant on where they occur. On the other hand, placing the camera to the light source, the method is also good to generate real-time caustics. Computing a map for each refractor surface, we can even evaluate multiple refractions without tracing rays. The method is fast and accurate if the scene consists of larger planar faces, when the results are similar to that of ray-tracing. This program can demonstrate three different effects, reflection, refraction, and caustics. All three effects are implemented both in the classical and our localized environment mapped method. The effects have control parameters. For example the reflection is controlled by Fresnel factor, the refraction is controlled by refraction index. These parameters can be changed at runtime by a GUI slider. Run --- Copy RayTraceEffects.exe (from the Debug or Release directory) to the solution'S directory and run. Build ----- Simply load and build the solution file (RayTraceEffects.sln) Usage ----- There are many parameters that can be set on the graphics user interface (e.g. sliders, checkboxes, or keyboard shortcuts) to experiment with the system. F1 displays information about the general controls. Note that for easier reading, the actual scene will be darkened while the help text is displayed. Press F1 again to hide the help text and restore the original brightness of the scene. To move the central object, use the arrow keys and Page Up / Page Down, respectively. To move the light source, you should press the ALT button simultaneously. You can change all parameters using the GUI sliders and checkboxes. If you prefer using your keyboard, press SPACE to enter to “Edit parameters” mode. In this mode, you can use the arrow keys to select a parameter and to change its value. Press Alt + Arrow keys to change the parameters in bigger steps. The user interface controls are the followings: o Left click drag: Rotate mesh o Mouse wheel: Zoom o Arrow keys: Move central object – the reflector/refractor object o Alt+Arrow keys: Move light object o F2: Settings o F3: Switch to REF device o F4: Show parameters ON/OFF o F5: Show HUD ON/OFF o F8: Switch to Wireframe mode o 1-5: Choose mesh o C: Caustics Effect ON/OFF o S: Shadow ON/OFF o X: Central Object render ON/OFF o D: Switch classic / our new distance impostor method o Y: Reset parameters o V: Independent Snippet size ON/OFF – we can adjust the snippets size automatically or it can be constant o M: Show Texture sample ON/OFF If the central object rendering is switched off, the central object is rendered with a single color. For the sake of uniformity, all meshes (including the rather simple meshes of the surrounding: room and columns) are stored in X file format of DirectX. The user can switch between different central objects by pressing the 1, 2, 3, 4, 5 and 6 buttons. Each central mesh is rescaled to (approximately) the same size and is translated to the center of the room.