diff --git a/apps/openmw/mwrender/renderconst.hpp b/apps/openmw/mwrender/renderconst.hpp index ab411a6cb..76a460a16 100644 --- a/apps/openmw/mwrender/renderconst.hpp +++ b/apps/openmw/mwrender/renderconst.hpp @@ -14,9 +14,9 @@ enum RenderQueueGroups RQG_Main = Ogre::RENDER_QUEUE_MAIN, - RQG_Water = Ogre::RENDER_QUEUE_6, + RQG_Water = Ogre::RENDER_QUEUE_7+1, - RQG_Alpha = Ogre::RENDER_QUEUE_7, + RQG_Alpha = Ogre::RENDER_QUEUE_MAIN, RQG_UnderWater = Ogre::RENDER_QUEUE_7+1, diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index 886c4b451..538e7290d 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -420,7 +420,7 @@ void NIFLoader::createMaterial(const String &name, " oColor.a = tex.a * diffuse.a * vertexColour.a; \n"; if (mrt) outStream << - " oColor1 = float4(iDepth / far, 0, 0, 1); \n"; + " oColor1 = float4(iDepth / far, 0, 0, (oColor.a == 1)); \n"; // only write to MRT if alpha is 1 outStream << "}"; diff --git a/files/gbuffer/gbuffer.compositor b/files/gbuffer/gbuffer.compositor index 8ab5665dd..6ca35df87 100644 --- a/files/gbuffer/gbuffer.compositor +++ b/files/gbuffer/gbuffer.compositor @@ -16,8 +16,9 @@ compositor gbuffer } pass render_scene { + // Renders everything except water first_render_queue 0 - last_render_queue 59 + last_render_queue 70 } } @@ -35,7 +36,9 @@ compositor gbuffer } } -// Finalizer compositor to render objects that we don't want in the MRT textures (this is the case for most transparent stuff) +// Finalizer compositor to render objects that we don't want in the MRT textures (ex. water) +// NB the water has to be rendered in a seperate compositor anyway, because it +// accesses the MRT textures which can't be done while they are still being rendered to. compositor gbufferFinalizer { technique @@ -63,7 +66,7 @@ compositor gbufferFinalizer } pass render_scene { - first_render_queue 60 + first_render_queue 71 last_render_queue 100 } }