C# Class Nez.ReflectionRenderer

assists in creating a mirror effect. To use the ReflectionRenderer do the following: - call createAndSetupScene being sure to pass in a renderOrder BEFORE the renderer that contains your reflective surface. - reflectableObjectRenderLayers should contain all the renderLayers that contain objects that you want reflected - create a ReflectionMaterial which you will use to render your reflective surfaces. Note that your reflective surfaces should NOT be rendered by the ReflectionRenderer! It needs to create a RenderTexture with just the objects to reflect. - you can optionally set a normal map on the ReflectionEffect for a refraction effect - move the ReflectionRenderer.camera around to get the desired offset for your reflections. You can also change the zoom of the Camera.
Inheritance: RenderLayerRenderer
Mostrar archivo Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
createAndSetupScene ( Scene scene, int renderOrder ) : ReflectionRenderer
onSceneBackBufferSizeChanged ( int newWidth, int newHeight ) : void

Private Methods

Method Description
ReflectionRenderer ( int renderOrder ) : System

Method Details

createAndSetupScene() public static method

public static createAndSetupScene ( Scene scene, int renderOrder ) : ReflectionRenderer
scene Scene
renderOrder int
return ReflectionRenderer

onSceneBackBufferSizeChanged() public method

public onSceneBackBufferSizeChanged ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
return void