Skip to content

Instantly share code, notes, and snippets.

@Noxalus
Created January 2, 2014 01:14
Show Gist options
  • Save Noxalus/8213607 to your computer and use it in GitHub Desktop.
Save Noxalus/8213607 to your computer and use it in GitHub Desktop.
DrawRefraction C# method.
private void DrawRefractionMap()
{
_device.SetRenderTarget(_refractionRenderTarget);
_device.Clear(ClearOptions.Target, Color.CornflowerBlue, 1.0f, 1);
DrawSkybox(_viewMatrix, _projectionMatrix, _cameraPosition);
DrawTerrain(_refractionEffect, _viewMatrix);
_device.SetRenderTarget(null);
_refractionTexture = _refractionRenderTarget;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment