Rendering Queues in Unity

Rendering Queues in Unity

A lot of times, we need to render certain objects(Player, Gem …etc) to the front even there is an object overlaying our main object.

No alt text provided for this image

Render Queues used to control drawing orders of objects, Source: kie


Controlling the drawing order of objects in Unity can be achieved using

Rendering Queues.


No alt text provided for this image

RenderingQueue Example, Source: BrightBit

Rendering Queue is a way of specifying which objects to render first by using tags assigned to the shader.

Unity has 5 default Rendering Queue tags:

1.Background (1000)

2.Geometry (2000)

3.Alpha test (2450)

4.Transparent (3000)

5.Overlay (4000)

You can assign the rendering queue tag to the shader by including this line in the shader or specifying it in the inspector.

Tags {“Queue” = “Geometry”}


You can have a specific value for your tag by setting it in the shader

Tags {“Queue” = “Geometry+100”}

Render queue value should be in [0..5000] range to work properly, or -1 to use the render queue from the shader.

To view or add a comment, sign in

More articles by Ahmed Schrute

  • Genetic Evolution (Behavioral Traits) Simulation using Unity3D

    This is a simulation of Genetic Evolution with a focus on Behavioral traits passed between generation, In this…

  • Vertex Fragment Shader Structure

    This article is a continuum of shader coding articles using Shader lab in Unity, I highly recommend you visit my two…

  • Normal Mapping

    If you have read the Lighting in Unity 1 and Lighting in Unity2, you have seen how important normal vectors are for…

    2 Comments
  • Light in Unity 2

    Intro to Blinn Phong Lighting model In the previous article, We have been through Lambert Lighting Model and how it…

  • Light in Unity 1

    Introduction to Lighting in Unity and Lambert Lighting Lighting in Computer Graphics is all about calculating the Pixel…

  • Shader Variables Data Types in Unity

    Why we use different variable types when writing shaders? Shader code is for every pixel(or vertex), therefor efficient…

  • Understanding Mesh Anatomy in Unity

    In order to shade a model we need to understand its geometric structure Let’s take a cube as an example of a mesh model…

  • Rendering Pipeline In Unity

    Introduction to Rendering Pipeline in Unity Rendering Rendering is the process of drawing a scene on the computer…

  • Unity CPU Profiling

    Enhancing unity CPU performance I usually have a routine before I start inspecting the CPU usage tap which is opening…

Explore content categories