can someone give a starter shader template for hdrp, at least to output texture or color, i found some examples on the net, here is one of them
Shader "Custom/Test"{
Properties{
_Color("Color", Color) = (1.0, 1.0, 0.8, 1.0)
_MainTex("Main Texture", 2D) = "white" {}
}
SubShader{
Tags { "RenderPipeline"="HDRenderPipeline" }
Pass{
Name "Forward"
Tags { "LightMode" = "Forward" }
ZTest LEqual
ZWrite Off
Cull Off
HLSLPROGRAM
#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma multi_compile_instancing
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma multi_compile_fragment PUNCTUAL_SHADOW_LOW PUNCTUAL_SHADOW_MEDIUM PUNCTUAL_SHADOW_HIGH
#pragma multi_compile_fragment DIRECTIONAL_SHADOW_LOW DIRECTIONAL_SHADOW_MEDIUM DIRECTIONAL_SHADOW_HIGH
#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_TANGENT_TO_WORLD
#include "CustomPassRenderers.hlsl"
#include "VertMesh.hlsl"
float4 _ColorMap_ST;
float4 _Color;
PackedVaryingsType Vert(AttributesMesh inputMesh){
VaryingsType varyingsType;
varyingsType.vmesh = VertMesh(inputMesh);
return PackVaryingsType(varyingsType);
}
float4 Frag(PackedVaryingsToPS packedInput) : SV_Target{
float4 outColor = _Color; // for test color
return outColor;
}
#pragma vertex Vert
#pragma fragment Frag
ENDHLSL
}
}
}
but it doesn’t work, there are no errors, if you insert a texture with an alpha channel, the outline is visible, but there is no color or picture.
can someone help with a starting template?