matinfo.b is smoothness, and matinfo.a metalness fr the gbuffer.

This commit is contained in:
Azaezel 2018-10-16 22:20:07 -05:00
parent ef81708e12
commit f5bab3f574
6 changed files with 12 additions and 12 deletions

View file

@ -256,8 +256,8 @@ void main()
float dotHVa = clamp(dot(normal, v), 0.0, 1.0);
float dotLHa = clamp(dot(l, h), 0.0, 1.0);
float roughness = matInfo.g;
float metalness = matInfo.b;
float roughness = 1.0001-matInfo.b;
float metalness = matInfo.a;
//diffuse
float disDiff = Fr_DisneyDiffuse(dotNVa, dotNLa, dotLHa, roughness);

View file

@ -194,8 +194,8 @@ void main()
float dotHVa = clamp(dot(normal, v), 0.0, 1.0);
float dotLHa = clamp(dot(l, h), 0.0, 1.0);
float roughness = matInfo.g;
float metalness = matInfo.b;
float roughness = 1.0001-matInfo.b;
float metalness = matInfo.a;
//diffuse
float disDiff = Fr_DisneyDiffuse(dotNVa, dotNLa, dotLHa, roughness);

View file

@ -294,8 +294,8 @@ void main()
float dotHVa = clamp(dot(normal, v), 0.0, 1.0);
float dotLHa = clamp(dot(l, h), 0.0, 1.0);
float roughness = matInfo.g;
float metalness = matInfo.b;
float roughness = 1.0001-matInfo.b;
float metalness = matInfo.a;
//diffuse
//float dotNL = clamp(dot(normal,l), 0.0, 1.0);

View file

@ -268,8 +268,8 @@ PS_OUTPUT main(ConvexConnectP IN)
float dotHVa = clamp(dot(normal, v), 0.0, 1.0);
float dotLHa = clamp(dot(l, h), 0.0, 1.0);
float roughness = matInfo.g;
float metalness = matInfo.b;
float roughness = 1.0001-matInfo.b;
float metalness = matInfo.a;
//diffuse
float disDiff = Fr_DisneyDiffuse(dotNVa, dotNLa, dotLHa, roughness);

View file

@ -198,8 +198,8 @@ PS_OUTPUT main( ConvexConnectP IN )
float dotHVa = clamp(dot(normal, v), 0.0, 1.0);
float dotLHa = clamp(dot(l, h), 0.0, 1.0);
float roughness = matInfo.g;
float metalness = matInfo.b;
float roughness = 1.0001-matInfo.b;
float metalness = matInfo.a;
//diffuse
float disDiff = Fr_DisneyDiffuse(dotNVa, dotNLa, dotLHa, roughness);

View file

@ -305,8 +305,8 @@ PS_OUTPUT main(FarFrustumQuadConnectP IN)
float dotHVa = clamp(dot(normal, v), 0.0, 1.0);
float dotLHa = clamp(dot(l, h), 0.0, 1.0);
float roughness = matInfo.g;
float metalness = matInfo.b;
float roughness = 1.0001-matInfo.b;
float metalness = matInfo.a;
//diffuse
//float dotNL = clamp(dot(normal,l), 0.0, 1.0);