36 lines
1.5 KiB
GLSL
36 lines
1.5 KiB
GLSL
Shader "Builtin Forward Lit"
|
|
{
|
|
Properties
|
|
{
|
|
_BaseColor ("Base Color", Color) = (1,1,1,1) [Semantic(BaseColor)]
|
|
_MainTex ("Base Map", 2D) = "white" [Semantic(BaseColorTexture)]
|
|
}
|
|
SubShader
|
|
{
|
|
Pass
|
|
{
|
|
Name "ForwardLit"
|
|
Tags { "LightMode" = "ForwardBase" }
|
|
Resources
|
|
{
|
|
PerObjectConstants (ConstantBuffer, 0, 0) [Semantic(PerObject)]
|
|
LightingConstants (ConstantBuffer, 1, 0) [Semantic(Lighting)]
|
|
MaterialConstants (ConstantBuffer, 2, 0) [Semantic(Material)]
|
|
ShadowReceiverConstants (ConstantBuffer, 3, 0) [Semantic(ShadowReceiver)]
|
|
BaseColorTexture (Texture2D, 4, 0) [Semantic(BaseColorTexture)]
|
|
LinearClampSampler (Sampler, 5, 0) [Semantic(LinearClampSampler)]
|
|
ShadowMapTexture (Texture2D, 6, 0) [Semantic(ShadowMapTexture)]
|
|
ShadowMapSampler (Sampler, 7, 0) [Semantic(ShadowMapSampler)]
|
|
}
|
|
HLSLPROGRAM
|
|
#pragma vertex MainVS
|
|
#pragma fragment MainPS
|
|
#pragma multi_compile _ XC_MAIN_LIGHT_SHADOWS
|
|
#pragma backend D3D12 HLSL "forward-lit.vs.hlsl" "forward-lit.ps.hlsl" vs_5_0 ps_5_0
|
|
#pragma backend OpenGL GLSL "forward-lit.vert.glsl" "forward-lit.frag.glsl"
|
|
#pragma backend Vulkan GLSL "forward-lit.vert.vk.glsl" "forward-lit.frag.vk.glsl"
|
|
ENDHLSL
|
|
}
|
|
}
|
|
}
|