Double Sided Shaders - Mobile URP

About Double Sided Shaders - Mobile URP – Unity VFX & Shader Pack

Double Sided Shaders - Mobile URP Unity Asset Overview

The Double Sided Shaders - Mobile URP package is optimized specifically for Unity's Universal Render Pipeline (URP). Designed to the traditional single-sided polygon culling, this shader set disables backface culling (using Cull Off) within the graphics hardware state. This enables single-plane meshes—such as foliage, leaves, cloth, banners, and 2D cards—to render both front and back faces without requiring duplicated geometry or inverted normals in external 3D modeling software.

Under the hood, mobile architecture requires precise light calculation handling when rendering backfaces. When standard shaders disable backface culling, backface lighting calculations often evaluate incorrectly because the geometric normal points away from the camera. This package resolves normal orientation issues by inspecting the surface orientation semantic—utilizing the FRONT_FACE_SEMANTIC (such as SV_IsFrontFace in HLSL) within the fragment pipeline. When a backface fragment is processed, the normal vector is inverted dynamically before feeding into the URP surface lighting evaluation (such as UniversalFragmentPBR or Lightweight Unlit passes), ensuring specular highlights and diffuse attenuation reflect light accurately on both surface sides.

Pipeline Compatibility & SRP Batcher Support

Mobile GPU Performance & Overdraw Mitigation

Mobile graphics processing units—including ARM Mali, Qualcomm Adreno, and Apple Silicon—rely heavily on Tile-Based Rendering (TBR) or Tile-Based Deferred Rendering (TBDR). Rendering double-sided geometry, particularly when combined with alpha testing (clip/cutout), directly impacts tile memory bandwidth and fill rate limits.

Fill Rate & Early-Z Interactions

Standard opaque geometry benefits from hardware Early-Z occlusion culling, which discards occluded pixels before executing complex fragment processing. When using opaque variants of these double-sided shaders, Early-Z remains fully operational. However, when utilizing the Alpha Cutout variant, the explicit use of the clip() or discard instruction in HLSL disables hardware Early-Z on many mobile GPUs. This causes the tile processor to defer depth testing until after fragment execution, increasing fill rate pressure and potential overdraw.

Profiling Highlights & Optimization Guidelines

Inspector Properties & Material Scripting Guide

The included shader inspectors provide access to fundamental PBR and Unlit properties while keeping shader keywords controlled to prevent material variant bloat. Key properties include Albedo texture maps, tinting controls, normal maps, smoothness, metallic response, and dynamic cutoff thresholds for alpha testing.

To modify material properties at runtime across hundreds of instances (e.g., foliage swaying or dynamic tinting) without instantiating unique Material copies that break batching, developers should utilize MaterialPropertyBlock objects via C# scripting.

Runtime Property Animation via MaterialPropertyBlock

The following production-ready C# script illustrates how to adjust alpha dynamic cutoffs and main color tints at runtime efficiently:

using UnityEngine;

[RequireComponent(typeof(Renderer))]
public class DoubleSidedMaterialController : MonoBehaviour
{
    private static readonly int BaseColorID = Shader.PropertyToID("_BaseColor");
    private static readonly int CutoffID = Shader.PropertyToID("_Cutoff");

    [SerializeField] private Color baseColor = Color.white;
    [SerializeField, Range(0f, 1f)] private float alphaCutoff = 0.5f;

    private Renderer targetRenderer;
    private MaterialPropertyBlock propertyBlock;

    private void Awake()
    {
        targetRenderer = GetComponent<Renderer>();
        propertyBlock = new MaterialPropertyBlock();
    }

    private void Start()
    {
        ApplyProperties();
    }

    public void SetAlphaCutoff(float cutoffValue)
    {
        alphaCutoff = Mathf.Clamp01(cutoffValue);
        ApplyProperties();
    }

    public void SetBaseColor(Color color)
    {
        baseColor = color;
        ApplyProperties();
    }

    private void ApplyProperties()
    {
        if (targetRenderer == null) return;

        targetRenderer.GetPropertyBlock(propertyBlock);
        propertyBlock.SetColor(BaseColorID, baseColor);
        propertyBlock.SetFloat(CutoffID, alphaCutoff);
        targetRenderer.SetPropertyBlock(propertyBlock);
    }
}

Setup & Implementation Workflow

Integrating these double-sided shaders into an existing mobile project requires minimal setup steps:

1. Pipeline Verification

Ensure that your project uses Universal Render Pipeline and that the active Universal Render Pipeline Asset is assigned under Project Settings > Graphics. Verify that the target render pipeline version matches your installed Unity environment.

2. Material Creation & Assignment

Create a new material in the Project window. In the material Inspector, open the shader dropdown menu and navigate to Mobile/URP/DoubleSided. Select the shader variant matching your performance requirements (e.g., Unlit, Lit PBR, or Cutout).

3. Geometry Setup Guidelines

Assign the generated material directly to single-plane 3D models or 2D quad meshes. Ensure UV mappings are correctly mapped. When using cutout shaders, ensure the source texture includes a clean alpha channel, and adjust the Alpha Cutout Threshold slider in the material inspector until edge artifacts disappear without trimming essential detail.

Asset Details & Specifications

CategoryVFX / Shaders
Latest Versionv1.0
File Size17.41 MB
Added to PlatformFebruary 6, 2026
Views1 views
Downloads0 downloads
Favourites0 favourites
Issue with Package?Report Broken Link →

Related Unity VFX Assets