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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Glass Stained shader is glitching other particles

Discussion in 'Shaders' started by Radeg90, Jan 3, 2018.

  1. Radeg90

    Radeg90

    Joined:
    Feb 28, 2017
    Posts:
    38
    Hi,
    I'm trying to make a big 3D working machine which is, if running, releasing heat and smoke.

    In order to add heat effect I used "FX/Glass/Stained BumpDisort" and put it into particle emitter, so it shows an effect similar to heat. Nextly on the chimney there is another particle which is releasing sprites which looks like smoke.

    Everything looks pretty nice, but both particles are glitching each other when it comes to collision and the problem is - in my opinion - glass shader.

    In order to show you exactly what is the problem, I moved glass effect next to the smoke and here is how it looks like:
    https://drive.google.com/file/d/1D2sziw0OxlG24KKYMTiDuQX8mF9MgWCd/view?usp=drivesdk

    How can I fix this?
     
  2. Balikk

    Balikk

    Joined:
    Oct 23, 2014
    Posts:
    49
    Hi,

    The render queue are the same for the both particles materials?
    If they are both at 3000, you can try to put 3001 for your glass/stained material.
     
    Radeg90 likes this.
  3. Radeg90

    Radeg90

    Joined:
    Feb 28, 2017
    Posts:
    38
    Wow! Amazing! Changing Render Queue from 3000 to 3001 solved my problem. You are amazing, thank you!
     
  4. Balikk

    Balikk

    Joined:
    Oct 23, 2014
    Posts:
    49
    Your welcome.
    For information, both of the shaders don't write in depth buffer and with the same render queue, unity render one time the smoke first, sometimes the glass like a coin flip.
    Now unity renders the smoke then the glass.
     
    Radeg90 likes this.