This page is a reference for “quickly finding things when you get confused while studying.”
In particular, HLSL items do not provide “concepts” but return value/signature/definition location/representative reference (xref).
13.0 Accurate Reference (IDE, URP 17.3.0)
- Lit Pass/Include Map: @@TOK_0_14164784@@
- Function signature index: @@TOK_1_20e1594e@@
- Structure (including fields): @@TOK_2_11a7626e@@
- Macro index: @@TOK_3_9ecae65e@@
- Lit core symbol xref: @@TOK_4_8394c928@@
13.1 C# (SRP/URP) core types
ScriptableRendererFeature— Renderer extension point- Related: 03. URP 아키텍처
ScriptableRenderPass— Pass unit (RecordRenderGraph/Execute)- Related: 03. URP 아키텍처, 04. RenderGraph
RenderGraph/TextureHandle— RenderGraph path/resource- Related: 04. RenderGraph, 05. 텍스처/ID/핸들
CommandBuffer/CommandBufferPool— GPU command history- Related: 06. CommandBuffer/Context
RTHandle— Render target handle for scale/dynamic resolution- Related: 05. 텍스처/ID/핸들
13.2 URP Frame Data (frequently used, RenderGraph path)
These are the data types accessed by ContextContainer frameData in the RenderGraph path.
UniversalResourceData— Collection of resource handles such as camera color/depth/history- Related: 04. RenderGraph, 05. 텍스처/ID/핸들
UniversalCameraData— Camera-related data (camera type/matrix/settings, etc.)- Related: 04. RenderGraph
Official documentation:
- Frame Data Access: https://docs.unity3d.com/kr/6000.3/Manual/urp/accessing-frame-data.html
13.3 HLSL(URP) core functions: signature/return value/definition location
The table below is the “Learning Core” extracted from the URP 17.3.0 ide index.
For the full list, search @@TOK_15_20e1594e@@.| Symbol | Returns | Params(요약) | Defined-in | related | |---|---|---|---|---| |TransformObjectToHClip|float4|float3 positionOS|<CORE>/ShaderLibrary/SpaceTransforms.hlsl:108| 08 | |GetVertexPositionInputs|VertexPositionInputs|float3 positionOS|<URP>/ShaderLibrary/ShaderVariablesFunctions.hlsl:8| 21 | |GetVertexNormalInputs|VertexNormalInputs|float3 normalOS, float4 tangentOS了 |<URP>/ShaderLibrary/ShaderVariablesFunctions.hlsl:22| 21 | |GetMainLight|Light| (overloads) |<URP>/ShaderLibrary/RealtimeLights.hlsl| 07 | |GetAdditionalLight|Light|uint i, float3 positionWS了 |<URP>/ShaderLibrary/RealtimeLights.hlsl| 07 | |GetAdditionalLightsCount|int| (none) |<URP>/ShaderLibrary/RealtimeLights.hlsl:271| 07 | |UniversalFragmentPBR|half4|InputData, SurfaceData|<URP>/ShaderLibrary/Lighting.hlsl:282| 22 | |InitializeStandardLitSurfaceData|void|float2 uv, out SurfaceData|<URP>/Shaders/LitInput.hlsl:252| 22 | |InitializeInputData|void|Varyings, normalTS, out InputData|<URP>/Shaders/LitForwardPass.hlsl:72| 22 |
representative xref(정의 + 아이처): @@TOK_34_8394c928@@
13.4 HLSL(URP) core structure: FIELD/정의 ויציק
Search the entire list from @@TOK_35_11a7626e@@.
| Structure | Fields(개수) | Defined-in | related |
|---|---|---|---|
Light | 5 | <URP>/ShaderLibrary/RealtimeLights.hlsl:12 | 07 |
InputData | 23 | <URP>/ShaderLibrary/Input.hlsl:43 | 21 |
SurfaceData | 10 | <URP>/ShaderLibrary/SurfaceData.hlsl:5 | 21 |
VertexPositionInputs | 4 | <URP>/ShaderLibrary/Core.hlsl:259 | 21 |
VertexNormalInputs | 3 | <URP>/ShaderLibrary/Core.hlsl:267 | 21 |
13.5 Forward+(Cluster) Related| Symbol | Type | Defined-in | Key Points |
|---|---|---|---|
| _CLUSTER_LIGHT_LOOP | shader keyword | <URP>/ShaderLibrary/ForwardPlusKeyword.deprecated.hlsl:20 etc | variant branch (Forward+) |
| USE_CLUSTER_LIGHT_LOOP | macro(0/1) | <URP>/ShaderLibrary/Core.hlsl:14 / :16 | include inner loop switch |
| LIGHT_LOOP_BEGIN/END | macros | <URP>/ShaderLibrary/RealtimeLights.hlsl:28 / :36 | Forward/Forward+ loop unification |
The most common pitfall is that GetAdditionalLightsCount() in Forward+ can be 0.
Detailed debugging routine: 07
13.6 ShaderLab Pass tags/LightMode (9 types as of URP 17.3.0 Lit)
| LightMode | Purpose (Summary) |
|---|---|
UniversalForward | Forward color |
UniversalGBuffer | Deferred GBuffer |
ShadowCaster | shadow |
DepthOnly | Depth |
DepthNormals | Depth+Normal |
Meta | Baking |
MotionVectors | velocity |
XRMotionVectors | XR velocity(+stencil) |
Universal2D | 2D Renderer |
Total ticket/consumption stage of the contract: @@TOK_18_b865c9ce@@
13.7 Commonly seen calls (concepts) in RenderGraph “Builder”
The exact signature may be different for different versions of URP, but conceptually you see the following call over and over again:
- Add pass:
renderGraph.AddRasterRenderPass<T>(...) - Texture creation:
renderGraph.CreateTexture(desc) - Import external RTHandle:
renderGraph.ImportTexture(rtHandle) - Read declaration:
builder.UseTexture(handle, AccessFlags.Read) - Color target setting:
builder.SetRenderAttachment(handle, index, AccessFlags.Write) - Execution function settings:
builder.SetRenderFunc((data, ctx) => { ... })
Related: 04. RenderGraph
13.8 Frequently seen calls (concepts) in ComputeGraphContext (Compute Pass)
In the Compute pass, ComputeGraphContext is passed, usually repeating the following pattern.
- Add pass:
renderGraph.AddComputePass<T>(...) - UAV texture creation:
desc.enableRandomWrite = true - Texture read/write declaration:
builder.UseTexture(handle, AccessFlags.Read/Write) - Binding:
cmd.SetComputeTextureParam(...),cmd.SetComputeBufferParam(...) - Run:
cmd.DispatchCompute(...)
Related: 17. RenderGraph Compute/UAV
13.9 ShaderLab tag/key (representative)
Tags { "RenderPipeline"="UniversalPipeline" }— Declare shader for URPTags { "LightMode"="UniversalForward" }— Declaration of pass usage selected by URPQueue/RenderType— Render queue/render type (opaque/transparent) classification
Related: 09. URP 호환 셰이더 작성
13.10 “Where can I check?” quick link
- URP conversion helper/shader method: https://docs.unity3d.com/6000.3/Documentation/Manual/urp/use-built-in-shader-methods-transformations.html
- Forward+ additional light: https://docs.unity3d.com/6000.3/Documentation/Manual/urp/rendering/additional-lights-fplus.html
- Create RenderGraph pass: https://docs.unity3d.com/Manual/urp/render-graph-write-render-pass.html