Amerio.Stephane Posted October 4, 2021 Posted October 4, 2021 Hi, I just discovered that Unigine has had "Jitter Transparency" for a while but I missed it somehow :) Anyway, I put a lot of hope in it but the current implementation has its flaws... - SRAA completely destroys Jitter Transparency. Too bad because SRAA is great. Are they definitively incompatible or could this be improved? - "Jitter Transparency" doesn't seem to jitter at all. The stipple pattern looks very much fixed to me. Am I missing something? - TAA + "Jitter Transparency" + moving camera or object = ugly (starfield effect, pixel trailing, perceived opacity changes a lot) - No TAA + "Jitter Transparency" + moving camera or object = could be acceptable, if there was actually some jittering; but TAA is almost a necessity for other effects - shadows ignores the "Jitter Transparency" (would be great if the shadows would consider the object as alpha blended with transparent shadows) - No "Jitter Transparency" for billboards or particles :( Thanks!
vvvaseckiy Posted October 6, 2021 Posted October 6, 2021 Quote - SRAA completely destroys Jitter Transparency. Too bad because SRAA is great. Are they definitively incompatible or could this be improved? I'll forward this question to our r'n'd team to check if this could be improved. But for now, there's no render setting to improve this in released SDK. Quote - "Jitter Transparency" doesn't seem to jitter at all. The stipple pattern looks very much fixed to me. Am I missing something? EDIT. Actually pattern jitters, but there's specific setting varying depending on TAA option. So it uses static noise when TAA disabled in scene, and dynamic when TAA is enabled, but, when TAA is enabled, it compensates jittering from Jitter Transparency. Quote - TAA + "Jitter Transparency" + moving camera or object = ugly (starfield effect, pixel trailing, perceived opacity changes a lot) - No TAA + "Jitter Transparency" + moving camera or object = could be acceptable, if there was actually some jittering; but TAA is almost a necessity for other effects Unfortunately it's true, this specific implementation imposes some restrictions on its use with some of post-effects Quote - shadows ignores the "Jitter Transparency" (would be great if the shadows would consider the object as alpha blended with transparent shadows) It's actually a bug, shadows were jittering while ago. We'll fix this in future releases. Quote - No "Jitter Transparency" for billboards or particles :( That's an oversight, we'll add jitter transparency to more objects, but for now i can't give any ETA on when it'll be implemented.
Amerio.Stephane Posted October 18, 2021 Author Posted October 18, 2021 Hi, After a lot of trial, I finally found some TAA settings that make Jitter Transparency quite nice. Still the main drawbacks now are that particles and billboards don't implement it, while being the ones that would benefit the most out of it (runway lights in clouds, fire and smoke in clouds). what would be a realistic expected version for Jitter Transparency on billboards and particles? 2.15.1 ? 2.16 ? This is important to know because it would allow us not to spend a lot of time on special work-around cases for these scenario. FYI, disabling TAA options "Fix Flicker", "Fix Blur" and "Frames By Velocity" produces the best looking result for us. Quite unexpected, given they should "fix" issues... Extending on Jitter Transparency subject, would it make sense that a Render setting would turn "Alpha Blend" materials into actually being rendered as "Alpha Test+Jitter" when toggling a flag? This would allow to have high quality blending when it make senses and fall back to jitter transparency only when required for all transparent materials? Just wondering what it would imply, or if it would be even interesting for us to pursue in this direction? Thanks!
silent Posted October 18, 2021 Posted October 18, 2021 Jitter transparency for big amount of 2D planes may significantly drop the performance due to the filtrate issues. You can modify billboards and particles shaders as you need to enable jitter transparency on your side. Basically you need to add a few additional lines to the depth fragment shaders (in alpha test section) from mesh_base: // depth_pre_pass.shader (mesh_base) float4 noise = TEXTURE_ARRAY_FETCH(TEX_NOISE, fmod(IN_POSITION.xy, 256), uint(s_frame) % 8 * uint(s_taa)); cutoff = noise.x; // MS_DEPTH #else if(transparent < cutoff) discard; #endif You would also require noise texture, in case of mesh_base it's a 2D Array from texture unit 16 (mesh_base.basemat): // fragment.h from mesh_base #ifdef JITTER_TRANSPARENCY INIT_TEXTURE_ARRAY(16, TEX_NOISE) #endif // mesh_base.basemat <texture unit="16" name="internal_noise" filter="point" hidden="1" force_streaming="true">core/textures/common/noise.dds</texture> Please check the attached modified files for billboards material. We do not recommend to replace built-it materials, but rather create an independent material / shader copy and maintain it separately. Since we rarely use these options even in mesh_base some bugs here might arise as well (for example in 2.14.x shadows from the jittered transparent meshes are not taking this jitter in account at all). And overall screen-door transparency like alpha test effects doesn't look good (especially with TAA), so that's I guess the main reason why it was added only to a single material. Thanks! billboards.zip 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts