Fixing slang compilation temporarily, renaming vertexfactory

This commit is contained in:
Dynamitos committed 2020-08-06 00:54:43 +02:00
1 parent ab4a3b5e23
commit f27859a02c
66 files changed
+1005 -627

No files matched your search

+6 -6
View File
@@ -1,7 +1,7 @@
import LightEnv;
import Material;
import BRDF;
import InputGeometry;
import MaterialParameter;
struct TexturedMaterial : IMaterial
{
@@ -21,15 +21,15 @@ struct TexturedMaterial : IMaterial
SamplerState textureSampler;
typedef BlinnPhong BRDF;
BlinnPhong prepare(MaterialPixelParameter geometry)
BlinnPhong prepare(MaterialFragmentParameter geometry)
{
BlinnPhong result;
result.baseColor = diffuseTexture.Sample(textureSampler, geometry.texCoord * uvScale).xyz;
result.baseColor = diffuseTexture.Sample(textureSampler, geometry.texCoords[0] * uvScale).xyz;
result.metallic = 0;
float3 bumpMapNormal = normalTexture.Sample(textureSampler, geometry.texCoord * uvScale).xyz;
float3 bumpMapNormal = normalTexture.Sample(textureSampler, geometry.texCoords[0] * uvScale).xyz;
bumpMapNormal = 2.0 * bumpMapNormal - float3(1.0, 1.0, 1.0);
result.normal = geometry.transformLocalToWorld(bumpMapNormal);
result.specular = specularTexture.Sample(textureSampler, geometry.texCoord * uvScale).x;
result.normal = geometry.transformNormalToWorld(bumpMapNormal);
result.specular = specularTexture.Sample(textureSampler, geometry.texCoords[0] * uvScale).x;
result.roughness = roughness;
result.specularTint = specularTint;
result.anisotropic = anisotropic;