shader adjustments
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Common;
|
||||
import Frustum;
|
||||
|
||||
struct BoundingSphere
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Common;
|
||||
import Frustum;
|
||||
|
||||
struct DispatchParams
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Common;
|
||||
import MaterialParameter;
|
||||
import Frustum;
|
||||
|
||||
interface ILightEnv
|
||||
{
|
||||
@@ -81,6 +82,8 @@ interface IBRDF
|
||||
float3 evaluateAmbient(float3 viewDir_WS);
|
||||
float getAlpha();
|
||||
float3 getEmissive();
|
||||
float getRoughness();
|
||||
float getMetallic();
|
||||
[mutating] void setNormal(float3 n);
|
||||
};
|
||||
|
||||
@@ -134,6 +137,8 @@ struct Phong : IBRDF
|
||||
{
|
||||
return emissive;
|
||||
}
|
||||
float getRoughness() { return pow(2.0 / (shininess + 2.0), 0.25); }
|
||||
float getMetallic() { return 0; }
|
||||
[mutating] void setNormal(float3 n) { normal = n; }
|
||||
};
|
||||
|
||||
@@ -187,6 +192,8 @@ struct BlinnPhong : IBRDF
|
||||
{
|
||||
return emissive;
|
||||
}
|
||||
float getRoughness() { return pow(2.0 / (shininess + 2.0), 0.25); }
|
||||
float getMetallic() { return 0; }
|
||||
[mutating] void setNormal(float3 n) { normal = n; }
|
||||
};
|
||||
|
||||
@@ -240,6 +247,8 @@ struct CelShading : IBRDF
|
||||
{
|
||||
return emissive;
|
||||
}
|
||||
float getRoughness() { return 1.0; }
|
||||
float getMetallic() { return 0; }
|
||||
[mutating] void setNormal(float3 n) { normal = n; }
|
||||
};
|
||||
|
||||
@@ -364,5 +373,7 @@ struct CookTorrance : IBRDF
|
||||
{
|
||||
return emissive;
|
||||
}
|
||||
float getRoughness() { return roughness; }
|
||||
float getMetallic() { return metallic; }
|
||||
[mutating] void setNormal(float3 n) { normal = n; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user