Version: Unity 6.5 (6000.5)
  • Supported
  • Legacy
Language : English
Surface Shader examples in the Built-In Render Pipeline
Reflection Surface Shader examples in the Built-In Render Pipeline

Normal mapping Surface Shader example in the Built-In Render Pipeline

Important: The Built-In Render Pipeline is deprecated and will be made obsolete in a future release.
It remains supported, including bug fixes and maintenance, through the full Unity 6.7 LTS lifecycle.
For more information on migration, refer to Migrating from the Built-In Render Pipeline to the Universal Render Pipeline and Render pipeline feature comparison.

Shader example that uses normal mapping.
Shader example that uses normal mapping.
 Shader "Example/Diffuse Bump" {
 Properties {
 _MainTex ("Texture", 2D) = "white" {}
 _BumpMap ("Bumpmap", 2D) = "bump" {}
 }
 SubShader {
 Tags { "RenderType" = "Opaque" }
 CGPROGRAM
 #pragma surface surf Lambert
 struct Input {
 float2 uv_MainTex;
 float2 uv_BumpMap;
 };
 sampler2D _MainTex;
 sampler2D _BumpMap;
 void surf (Input IN, inout SurfaceOutput o) {
 o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
 o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
 }
 ENDCG
 } 
 Fallback "Diffuse"
 }
Surface Shader examples in the Built-In Render Pipeline
Reflection Surface Shader examples in the Built-In Render Pipeline
Copyright ©2005-2026 Unity Technologies. All rights reserved. Built from job ID 70950424. Built on: 2026年07月02日.

AltStyle によって変換されたページ (->オリジナル) /