|
|
@@ -456,17 +456,17 @@ void View::Render()
|
|
|
graphics_->SetTexture(TU_INDIRECTION, renderer_->GetIndirectionCubeMap());
|
|
|
}
|
|
|
|
|
|
- // Set "view texture" to prevent destination texture sampling in case we do not render to the destination directly
|
|
|
- // ie. when using deferred rendering and/or doing post-processing
|
|
|
+ // Set "view texture" to prevent destination texture sampling during all renderpasses
|
|
|
if (renderTarget_)
|
|
|
+ {
|
|
|
graphics_->SetViewTexture(renderTarget_->GetParentTexture());
|
|
|
-
|
|
|
- // On OpenGL, flip the projection if rendering to a texture so that the texture can be addressed in the same way
|
|
|
- // as a render texture produced on Direct3D9
|
|
|
- #ifdef USE_OPENGL
|
|
|
- if (renderTarget_)
|
|
|
+
|
|
|
+ // On OpenGL, flip the projection if rendering to a texture so that the texture can be addressed in the same way
|
|
|
+ // as a render texture produced on Direct3D9
|
|
|
+ #ifdef USE_OPENGL
|
|
|
camera_->SetFlipVertical(true);
|
|
|
- #endif
|
|
|
+ #endif
|
|
|
+ }
|
|
|
|
|
|
// Render
|
|
|
ExecuteRenderPathCommands();
|