最低限の URP Unlit
https://gyazo.com/78af50c69c48bac0915a56c6dc49f50b
Unity: 2023.1 (URP: 15.0.5)
Shader
code:hlsl
Shader "00_UnlitBase"
{
Properties
{ }
SubShader
{
Tags { "RenderPipeline" = "UniversalPipeline" "RenderType"="Opaque" }
LOD 100
// Render State
ZWrite On
Cull Back
Pass
{
Name "Unlit"
HLSLPROGRAM
// Pragmas
// Includes
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" struct Attributes
{
float4 positionOS : POSITION;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
};
Varyings vert(Attributes input)
{
Varyings output;
output.positionCS = TransformObjectToHClip(input.positionOS.xyz);
return output;
}
void frag(Varyings input, out half4 outColor : SV_Target0)
{
outColor = half4(0.18, 0.18, 0.18, 1.0);
}
ENDHLSL
}
}
}
Refs