Add a bit conditional compiling

This commit is contained in:
ExMatics HydrogenC
2024-06-05 07:40:03 +08:00
parent ce73394531
commit 9d6778ff1e
8 changed files with 20 additions and 8 deletions
@@ -840,7 +840,7 @@ void ParticleEmitterGPUGenerator::ProcessModule(Node* node)
" uint2 pixel = uv * ScreenSize.xy;\n"
" float depth = {11}.Load(uint3(pixel, 0)).r;\n"
" float linearDepth = ViewInfo.w / (depth + ViewInfo.z) * ViewFar;\n"
" float linearDepth = ViewInfo.w / (depth - ViewInfo.z) * ViewFar;\n"
" if (viewPos.z > linearDepth - {5} && viewPos.z < linearDepth + {5} + {10})\n"
" {{\n"