Shader "Builtin Unlit" { Properties { _BaseColor ("Base Color", Color) = (1,1,1,1) [Semantic(BaseColor)] _MainTex ("Base Map", 2D) = "white" [Semantic(BaseColorTexture)] } SubShader { Pass { Name "Unlit" Tags { "LightMode" = "Unlit" } Cull Back ZWrite On ZTest LEqual HLSLPROGRAM #pragma target 4.5 #pragma vertex MainVS #pragma fragment MainPS cbuffer PerObjectConstants { float4x4 gProjectionMatrix; float4x4 gViewMatrix; float4x4 gModelMatrix; float4x4 gNormalMatrix; }; cbuffer MaterialConstants { float4 gBaseColorFactor; }; Texture2D BaseColorTexture; SamplerState LinearClampSampler; struct VSInput { float3 position : POSITION; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; }; struct PSInput { float4 position : SV_POSITION; float2 texcoord : TEXCOORD0; }; PSInput MainVS(VSInput input) { PSInput output; const float4 positionWS = mul(gModelMatrix, float4(input.position, 1.0f)); const float4 positionVS = mul(gViewMatrix, positionWS); output.position = mul(gProjectionMatrix, positionVS); output.texcoord = input.texcoord; return output; } float4 MainPS(PSInput input) : SV_TARGET { return BaseColorTexture.Sample(LinearClampSampler, input.texcoord) * gBaseColorFactor; } ENDHLSL } } }