A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/shader-branching-built-in-macros.html below:

Manual: Branch in a shader via built-in macros

Add built-in keyword sets

Platform and graphics API macros

Branch in a shader via built-in macros

Resources for adding a condition in a shaderA program that runs on the GPU. More info
See in Glossary
based on the platform, shader model, Unity Version, or shader pass.

Page Description Branch based on platform or graphics API Use SHADER_API macros to make shader behaviour conditional on the platform or graphics API. Branch based on shader model Use SHADER_TARGET to make shader behaviour conditional on the shader model. Branch based on platform features Use platform difference helpers to make shader behaviour conditional on platform functionality. Branch based on Unity version Use UNITY_VERSION to make shader behaviour conditional on the Unity version. Branch based on shader pass or shader stage Use SHADER_STAGE or UNITY_PASS to make shader behaviour conditional on the shader stage or shader pass. Additional resources

Add built-in keyword sets

Platform and graphics API macros

Copyright ©2005-2025 Unity Technologies. All rights reserved. Built from 6000.1.13f1 (f90392bf3052). Built on: 2025-07-10.

TutorialsCommunity AnswersKnowledge BaseForumsAsset StoreTerms of useLegalPrivacy PolicyCookiesDo Not Sell or Share My Personal Information Your Privacy Choices (Cookie Settings)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4