Files
Seele/res/shaders/lib/FlatColorMaterial.slang
T
2020-06-02 11:46:18 +02:00

28 lines
588 B
Plaintext

import LightEnv;
import Material;
import BRDF;
import InputGeometry;
struct FlatColorMaterial : IMaterial
{
float3 diffuseColor;
float specularity;
typedef BlinnPhong BRDF;
BlinnPhong prepare(MaterialPixelParameter input)
{
BlinnPhong result;
result.baseColor = diffuseColor;
result.specular = specularity;
result.normal = normalize(input.normal);
result.roughness = 0.5;
result.specularTint = 0;
result.anisotropic = 1;
result.sheen = 1;
result.sheenTint = 0.5;
result.clearCoat = 0;
result.clearCoatGloss = 0;
return result;
}
};