base icon indicating copy to clipboard operation
base copied to clipboard

soft particle shading not working correctly

Open Jigoku opened this issue 4 years ago • 1 comments

This is under the assumption that PT_SOFT is supposed to be blending the particle texture when it intersects with overlapping geometry; for example: http://blog.wolfire.com/2010/04/Soft-Particles

The particle textures are abruptly clipped off: 2021-03-12-073007_1920x1080_scrot softparticles has no visible effect when the particlesoft shader is used, which i believe is supposed to be depth testing to factor in alpha blending similar to the wolfire link above.

Jigoku avatar Mar 12 '21 11:03 Jigoku

So turns out it wasn't the shader, but most particles are using quadrenderer (they need softquadrenderer for it to work):

diff --git a/src/engine/renderparticles.cpp b/src/engine/renderparticles.cpp
index 5b767e87..04c58827 100644
--- a/src/engine/renderparticles.cpp
+++ b/src/engine/renderparticles.cpp
@@ -1172,7 +1172,7 @@ static partrenderer *parts[] =
     new softquadrenderer("<grey><rotate:1>particles/hint_vert", PT_PART|PT_BRIGHT),
     new quadrenderer("<grey>particles/hint_vert", PT_PART|PT_BRIGHT),
     new softquadrenderer("<grey>particles/smoke", PT_PART|PT_FLIP|PT_SHRINK|PT_WIND),
-    new quadrenderer("<grey>particles/smoke", PT_PART|PT_FLIP|PT_SHRINK|PT_WIND),
+    new softquadrenderer("<grey>particles/smoke", PT_PART|PT_FLIP|PT_SHRINK|PT_WIND),
     new softquadrenderer("<grey>particles/hint", PT_PART|PT_BRIGHT),
     new quadrenderer("<grey>particles/hint", PT_PART|PT_BRIGHT),
     new softquadrenderer("<grey>particles/hint_bold", PT_PART|PT_BRIGHT),

2021-03-12-151435_1920x1080_scrot

Wondering if this should be changed to softquad for this smoke particle?

Jigoku avatar Mar 12 '21 15:03 Jigoku

Another one that was fixed accidentally in a recent overhaul 😅

qreeves avatar Oct 22 '22 11:10 qreeves