JustPaste.it

APB OUTLINE SHADER, I DIDN'T CREATE THESE SHADERS. I DON'T KNOW WHO DID. I AM JUST SHARING THEM.

I think it was Karyl or dreamss


If you mess things up by editing the files, I take no responsibility what so ever, and I will not offer ANY support. Edit the file at your own risk.

 

1,
Open the file "APBUberPostProcessBlendPixelShader" in notepad. You will find it in \Steam\SteamApps\common\APB Reloaded\Engine\Shaders.

 

2,
After this line: "OutColor = float4(AdjustedColour, FocusedSceneColorAndDepth.a);", and before the last "}", Paste the following text:

float2 ScreenSize = float2( 1.0 / 1920, 1.0 / 1080 );
float flDepth = CalcSceneDepth( SceneUV );
float flDepthTop = abs(flDepth - CalcSceneDepth( SceneUV + float2(0.0, -ScreenSize.y) ) );
float flDepthLeft = abs(flDepth - CalcSceneDepth( SceneUV + float2(-ScreenSize.x, 0.0 ) ) );
float flDepthRight = abs(flDepth - CalcSceneDepth( SceneUV + float2(ScreenSize.x, 0.0 ) ) );
float flDepthBottom = abs(flDepth - CalcSceneDepth( SceneUV + float2(0.0, ScreenSize.y ) ) );
flDepthTop /= 100.0;flDepthLeft/= 100.0;flDepthRight /= 100.0;flDepthBottom /= 100.0;flDepth /= 100.0;

if(flDepthTop >= 0.1 * flDepth && flDepthTop <= 3000.0 || flDepthLeft >= 0.1 * flDepth && flDepthLeft <= 3000.0 || flDepthRight >= 0.1 * flDepth && flDepthRight <= 3000.0 || flDepthBottom >= 0.1 * flDepth && flDepthBottom <= 3000.0)
{
OutColor = float4(0.0, 0.0, 0.0, 1.0);
}

3, 
IF your screen resolution is not 1920 x 1080, you need to insert your resolution in the first line, looking like this float2 ScreenSize = float2( 1.0 / 1920, 1.0 / 1080 );. Change 1920 and 1080 to your resolution. Don't forget to save the file. You will need to restart APB.

 

4,
I will not help you any further with this. Like I said, if you screw it up, I'm sorry, but you do this at your own risk. I will not answer questions about hwo to fix it. You can always just repair APB. But good luck anyways! :-)