restored render queue of transparent objects, they are now part of the mrt textures

this fixes some issues with transparent objects not visible in the refraction
actorid
scrawl 13 years ago
parent 044d649edd
commit 96911ada95

@ -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,

@ -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 <<
"}";

@ -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
}
}

Loading…
Cancel
Save