Migrate builtin shaders to Unity-like authoring
This commit is contained in:
@@ -1,99 +1,30 @@
|
||||
Shader "Builtin Forward Lit"
|
||||
{
|
||||
"name": "Builtin Forward Lit",
|
||||
"properties": [
|
||||
Properties
|
||||
{
|
||||
"name": "_BaseColor",
|
||||
"displayName": "Base Color",
|
||||
"type": "Color",
|
||||
"defaultValue": "(1,1,1,1)",
|
||||
"semantic": "BaseColor"
|
||||
},
|
||||
{
|
||||
"name": "_MainTex",
|
||||
"displayName": "Base Map",
|
||||
"type": "2D",
|
||||
"defaultValue": "white",
|
||||
"semantic": "BaseColorTexture"
|
||||
_BaseColor ("Base Color", Color) = (1,1,1,1) [Semantic(BaseColor)]
|
||||
_MainTex ("Base Map", 2D) = "white" [Semantic(BaseColorTexture)]
|
||||
}
|
||||
],
|
||||
"passes": [
|
||||
SubShader
|
||||
{
|
||||
"name": "ForwardLit",
|
||||
"tags": {
|
||||
"LightMode": "ForwardBase"
|
||||
},
|
||||
"resources": [
|
||||
Pass
|
||||
{
|
||||
"name": "PerObjectConstants",
|
||||
"type": "ConstantBuffer",
|
||||
"set": 1,
|
||||
"binding": 0,
|
||||
"semantic": "PerObject"
|
||||
},
|
||||
{
|
||||
"name": "MaterialConstants",
|
||||
"type": "ConstantBuffer",
|
||||
"set": 2,
|
||||
"binding": 0,
|
||||
"semantic": "Material"
|
||||
},
|
||||
{
|
||||
"name": "BaseColorTexture",
|
||||
"type": "Texture2D",
|
||||
"set": 3,
|
||||
"binding": 0,
|
||||
"semantic": "BaseColorTexture"
|
||||
},
|
||||
{
|
||||
"name": "LinearClampSampler",
|
||||
"type": "Sampler",
|
||||
"set": 4,
|
||||
"binding": 0,
|
||||
"semantic": "LinearClampSampler"
|
||||
Name "ForwardLit"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
Resources
|
||||
{
|
||||
PerObjectConstants (ConstantBuffer, 1, 0) [Semantic(PerObject)]
|
||||
MaterialConstants (ConstantBuffer, 2, 0) [Semantic(Material)]
|
||||
BaseColorTexture (Texture2D, 3, 0) [Semantic(BaseColorTexture)]
|
||||
LinearClampSampler (Sampler, 4, 0) [Semantic(LinearClampSampler)]
|
||||
}
|
||||
HLSLPROGRAM
|
||||
#pragma vertex MainVS
|
||||
#pragma fragment MainPS
|
||||
#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
|
||||
}
|
||||
],
|
||||
"variants": [
|
||||
{
|
||||
"stage": "Vertex",
|
||||
"backend": "D3D12",
|
||||
"language": "HLSL",
|
||||
"source": "forward-lit.vs.hlsl",
|
||||
"entryPoint": "MainVS",
|
||||
"profile": "vs_5_0"
|
||||
},
|
||||
{
|
||||
"stage": "Fragment",
|
||||
"backend": "D3D12",
|
||||
"language": "HLSL",
|
||||
"source": "forward-lit.ps.hlsl",
|
||||
"entryPoint": "MainPS",
|
||||
"profile": "ps_5_0"
|
||||
},
|
||||
{
|
||||
"stage": "Vertex",
|
||||
"backend": "OpenGL",
|
||||
"language": "GLSL",
|
||||
"source": "forward-lit.vert.glsl"
|
||||
},
|
||||
{
|
||||
"stage": "Fragment",
|
||||
"backend": "OpenGL",
|
||||
"language": "GLSL",
|
||||
"source": "forward-lit.frag.glsl"
|
||||
},
|
||||
{
|
||||
"stage": "Vertex",
|
||||
"backend": "Vulkan",
|
||||
"language": "GLSL",
|
||||
"source": "forward-lit.vert.vk.glsl"
|
||||
},
|
||||
{
|
||||
"stage": "Fragment",
|
||||
"backend": "Vulkan",
|
||||
"language": "GLSL",
|
||||
"source": "forward-lit.frag.vk.glsl"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user