Add _rt_FullFrameDepth as IMAGE_FORMAT_NV_INTZ#1914
Conversation
|
This code helps, but I think there must be a more elegant solution. if (g_CurrentViewID == VIEW_MAIN) {
pRTColor = GetFullscreenTexture();
pRTDepth = GetFullFrameDepthTexture();
}void CSkyboxView::Draw()
{
VPROF_BUDGET( "CViewRender::Draw3dSkyboxworld", "3D Skybox" );
ITexture *pRTColor = NULL;
ITexture *pRTDepth = NULL;
if (g_CurrentViewID == VIEW_MAIN) { // extra code
pRTColor = GetFullscreenTexture();
pRTDepth = GetFullFrameDepthTexture();
}
if( m_eStereoEye != STEREO_EYE_MONO )
{
pRTColor = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(m_eStereoEye-1), ISourceVirtualReality::RT_Color );
pRTDepth = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(m_eStereoEye-1), ISourceVirtualReality::RT_Depth );
}
DrawInternal(VIEW_3DSKY, true, pRTColor, pRTDepth );
}Desktop.2026.05.05.-.06.13.45.02.mp4 |
|
Seems INTZ kill MSAA |
Otherwise, INTZ would forcefully disable MSAA.
|
What's the motivation for this? |
This allow to get depth buffer without second render of scene like as do Resolved Depth Buffer in SSAO_DepthPass function. This can be useful for modders on Source SDK 2013 for deferred renderer. Thats why INTZ kill MSAA. https://www.dmitrex.com/publications/Enhancing%20the%20looks%20of%20Source%20Engine%20in%20Military%20Conflict%20Vietnam.pdf |
|
Just change the pyrovision check instead so SSAO_DepthPass always runs if there's something in the scene that needs it. Instead of hardcoding to only have pyrovision on? |
|
But its not a SSAO_DepthPass. INTZ depth is cheaper to get, than Resolved Depth. |
|
I know, I was suggesting since the feature's already implemented, it could be made more "available", which is potentially a lower bar to clear than this. Also it's only 8-bit in the red buffer, other channels should be used to encode more data... |
|
@neobenedict you can run GetRenderTargetEx in view.cpp |




Description
INTZ colored hardware depth can be as analogue of Resolved Depth buffer from


SSAO_DepthPassfor moders. Without extra rendering of scene.We can see scene on our screen.
And hardware colored INTZ depth on
_rt_FullFrameDepthrender target.Explanation of code
PushRenderTargetAndViewportallow to write Hardware depth as second arg, but we need to input both args. First as colored rendertarget and second depth render target. We can't skip first argument.When we run
PushRenderTargetAndViewportwith colored and depth args, scene will gone from screen. So we need to return that, and we callpRenderContext->CopyTextureToRenderTargetEx(0, pColor, NULL, NULL);to write image toBackBufferfrom colored texture.