Skip to content

Commit f37e1ca

Browse files
markg-unityEvergreen
authored andcommitted
[Port] [2022.3] DOCG-6832 Update CGPROGRAM to HLSLPROGRAM
1 parent 11eeacd commit f37e1ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Packages/com.unity.render-pipelines.universal/Documentation~/writing-shaders-urp-basic-unlit-structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ This block contains the HLSL program code.
143143

144144
> **NOTE**: HLSL language is the preferred language for URP shaders.
145145
146-
> **NOTE**: URP supports the CG language. If you add the CGPROGRAM/ENDCGPROGRAM block in a shader, Unity includes shaders from the Built-in Render Pipeline library automatically. If you include shaders from the SRP shader library, some SRP shader macros and functions might conflict with the Built-in Render Pipeline shader functions. Shaders with the CGPROGRAM block are not SRP Batcher compatible.
147-
148146
This block contains the `#include` declaration with the reference to the `Core.hlsl` file.
149147

150148
```c++
@@ -164,6 +162,8 @@ Varyings vert(Attributes IN)
164162
}
165163
```
166164
165+
> **Note**: Don't import shader library files from both the Scriptable Render Pipeline (SRP) and the Built-In Render Pipeline in the same shader. Some SRP shader macros and functions might conflict with the Built-in Render Pipeline shader functions. For more information, refer to [Shader methods in URP](use-built-in-shader-methods) and [Import a file from the shader library in the Built-In Render Pipeline](../SL-BuiltinIncludes).
166+
167167
The fragment shader in this basic HLSL code outputs the single color predefined in the code:
168168
169169
```c++

0 commit comments

Comments
 (0)