Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question URP Shader Graph - Particle System + Vertex Colored 3D Object

Discussion in 'General Graphics' started by Linkupdated, Jul 20, 2022.

  1. Linkupdated

    Linkupdated

    Joined:
    Sep 24, 2014
    Posts:
    8
    Hello all,


    I have a cube in blender that use Vertex color to color the object



    This cube uses a simple custom made shader that converts vertex color into color for unity.



    I need to apply the same exact shader to my particle system that spawn the same exact cube.



    For some strange reason my cube spawned in particles do not have the same color anymore.


    (Left Particle, right prefab)



    I don't understand why it's different. The only shader that work for my particle is the basic particle lit of unity


    Universal Render Pipeline->Particles->Lit







    But if you simply activate it it's the same issue



    But if I activate enable Mesh GPU Instancing inside the particle



    Suddenly my vertex color worked on my particle.


    I don't know exactly why it doesn't work with my regular shader. I really need to be able to edit it from the shadergraph because I have other stuff to do with it and I don't know why it doesn't work properly.

    Thanks in advance for your time.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,116
    Strange - I've just looked at the code and it seems like we do try to support applying the mesh vertex color in our non-gpu-instanced code path.

    One possible explanation - are the colors exported as 8 bits per channel? If you have control over that, it's worth checking it. We only support 8-bit mesh colors in the non-gpu-instanced code.

    Or perhaps you have hit a bug! Would you be able to submit a bug report for it?
    I'd be curious to know if this also happens in the old Built-in Render Pipeline, but it's probably not a good use of your time to answer that question for me, so we can take a look here if you're able to send a bug report :)

    Thanks!