Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with "CartoonFxRemasterFree" #324

Open
Hdongyeop opened this issue Aug 14, 2024 · 5 comments
Open

How to use with "CartoonFxRemasterFree" #324

Hdongyeop opened this issue Aug 14, 2024 · 5 comments
Assignees
Labels
faq question Further information is requested

Comments

@Hdongyeop
Copy link

NOTE: Your issue may already be reported! Please search on the issue tracker before creating one.

Describe what help do you need
Hello, I want to use particle systems in this asset(https://assetstore.unity.com/packages/vfx/particles/cartoon-fx-remaster-free-109565).
I drag a FX prefabs into canvas in hierarchy, right click - prefab - Unpack Completely and add component UI Particle.
and then I pressed fresh button in component. it looks good in scene view. but in game view it seems black.
I think it happened because the particle system had a complex shader.
But I saw you used this Cartoon FX in demo. so I'm wandering how to use.

Additional context
Question_UGUI

you can see all particles rendered black.

@Hdongyeop Hdongyeop added the question Further information is requested label Aug 14, 2024
@mob-sakai
Copy link
Owner

Thank you for your reporting!

@mob-sakai
Copy link
Owner

Unfortunately, the demo contains an old version of CartoonFx (currently not available in the Asset Store).
As you mentioned, CartoonFxRemasterFree uses complex shaders (CFXR Particle Ubershader.cfxrshader, etc.).
Setting Canvas.renderMode=ScreenSpaceCamera would support some prefabs.

@mob-sakai mob-sakai changed the title How can I use this particles with ParticleEffectForUGUI? How to use with "CartoonFxRemasterFree" Aug 21, 2024
@mob-sakai
Copy link
Owner

If you do not use these shaders outside of UIParticles, you can use them by following the steps below:

  1. comment out the whole “Shader Caster” path
  2. add ZTest Always to the “Base” path
  3. Set TexCoord1 and TexCoord2 to Canvas.additionalShaderChannels

@mob-sakai mob-sakai pinned this issue Aug 21, 2024
@mob-sakai mob-sakai added the faq label Aug 21, 2024
@PalaNolho
Copy link

PalaNolho commented Nov 15, 2024

Hi @mob-sakai
I know this is a bit of a necro post but since I'm having the same problem and I do need to use SP Overlay, I was wondering if you would be able to explain a bit better what I can do/change in the particles to make them render correctly in the screen overlay instead of having to use SP Camera.

I'm happy to duplicate the materials, custom shaders, whatever, and modify then, but I'm not quite sure how to do it and where to do it :S

Or provide some directions on how we can create a particle that will work in Screen Space overlay (using the shuriken particles)?

Thank you in advance.

@mob-sakai
Copy link
Owner

Sure.

First, this is the "CFXR Explosion 1" from CFXR. As you can see, it does not support UIParticle as-is.

The shader used in "CFXR Explosion 1" is "CFXR Particle Ubershader.crxrshader."
Make the following adjustments to this file:

  1. Locate the ShadowCaster pass and comment out the entire pass:
/*
// vvvv Comment out "ShadowCaster" pass whole vvvv
Pass
{
    Name "ShadowCaster"
    Tags { "LightMode" = "ShadowCaster" }
    ...
}
// ^^^^ Comment out "ShadowCaster" pass whole ^^^^
*/
  1. Locate the BASE pass and add ZTest Always. (For URP, locate the BASE_URP pass):
Pass
{
    Name "BASE"
    Tags { "LightMode"="ForwardBase" }
    ZTest Always // Add This
    ...
  1. Add TexCoord1 and TexCoord2 to Canvas.additionalShaderChannels:

🎉

However, note that the ring effect is not displayed correctly (the lines are extremely thin).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants