implemented basic shader expressions

This commit is contained in:
Dynamitos
2023-02-24 22:09:07 +01:00
parent 48fa098546
commit f46262b66e
67 changed files with 1390 additions and 852 deletions
+20 -23
View File
@@ -35,27 +35,24 @@
"type": "SamplerState"
}
},
"code": {
"baseColor": [
"return diffuseTexture.Sample(textureSampler, input.texCoords[0] * uvScale).xyz;"
],
"metallic": [
"return metallic;"
],
"normal": [
"return normalTexture.Sample(textureSampler, input.texCoords[0] * uvScale).xyz;"
],
"specular": [
"return specularTexture.Sample(textureSampler, input.texCoords[0] * uvScale).x;"
],
"roughness": [
"return roughness;"
],
"sheen": [
"return sheen;"
],
"worldOffset": [
"return worldOffset;"
]
}
"code": [
{
"exp": "Sample",
"texture": "diffuseTexture",
"sampler": "textureSampler",
"coords": "input.texCoords[0]"
},
{
"exp": "Swizzle",
"target": 0,
"comp": [0, 1, 2]
},
{
"exp": "BRDF",
"profile": "BlinnPhong",
"values": {
"baseColor": 1
}
}
]
}