Depth Buffer in SMAA, or can you fix this thing?

  • Martigen
  • Topic Author
More
5 years 10 months ago #1 by Martigen Depth Buffer in SMAA, or can you fix this thing? was created by Martigen

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
5 years 10 months ago - 5 years 10 months ago #2 by kingeric1992 Replied by kingeric1992 on topic Depth Buffer in SMAA, or can you fix this thing?
First of all,
	pass LinearDepthPass

	{
#if (EdgeDetectionType == 3)
		VertexShader = Reshade::PostProcessVS;
		PixelShader = LinearDepthPS;
		RenderTarget = LinearDepthTex;
		ClearRenderTargets = true;
#endif
	}
the #if .etc are preprocessors, which only initialize once upon compilation and they only 'sees' other preprocessor directives.
Instead of codes that actually runs by execution, they are more like a build script that can help built different code with ease.

so in your implementation, after preprocessor done with the initialization, it will be just
	pass LinearDepthPass
	{
	}
since there isn't a
#define EdgeDetectionType  3
before the check.

And
void LinearDepthPS(
	in float4 position : SV_Position,
	in float2 texcoord : TEXCOORD0,
	out float4 LiniOut)
you're missing the output binding, SV_Target or COLOR .etc. but since reshade wasn't trying to compile the shader from the previous reason, you won't see the error message about it.

And I'm curious about what does it say about stencil buffer from your note?

Also, you can look into hlsl and MS effect framework as reshade syntax share some similarity to it.
Last edit: 5 years 10 months ago by kingeric1992.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.