- Posts: 466
Depth Buffer in SMAA, or can you fix this thing?
- Martigen
-
Topic Author
- Away
Less More
2 years 7 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
-
- Offline
Less More
- Posts: 177
2 years 7 months ago - 2 years 7 months ago #2 by kingeric1992
Replied by kingeric1992 on topic Depth Buffer in SMAA, or can you fix this thing?
First of all,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 justsince there isn't abefore the check.
Andyou'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.
pass LinearDepthPass
{
#if (EdgeDetectionType == 3)
VertexShader = Reshade::PostProcessVS;
PixelShader = LinearDepthPS;
RenderTarget = LinearDepthTex;
ClearRenderTargets = true;
#endif
}
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
{
}
#define EdgeDetectionType 3
And
void LinearDepthPS(
in float4 position : SV_Position,
in float2 texcoord : TEXCOORD0,
out float4 LiniOut)
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: 2 years 7 months ago by kingeric1992.
Please Log in or Create an account to join the conversation.