Shaders are not compiling anymore...
This commit is contained in:
@@ -30,7 +30,7 @@ struct BlinnPhong : IBRDF
|
||||
float3 h = lightDir_WS + viewDir_WS;
|
||||
float specular = dot(normal_WS, h);
|
||||
|
||||
return lightDir_WS * 2 + float3(1, 1, 1);//baseColor * (diffuse + specular) * lightColor;
|
||||
return baseColor * (diffuse + specular) * lightColor;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -35,14 +35,15 @@ struct Frustum
|
||||
Plane basePlane;
|
||||
bool pointInside(float3 point)
|
||||
{
|
||||
if (dot(basePlane.n, point) + basePlane.d < 0)
|
||||
float result = dot(basePlane.n, point) + basePlane.d;
|
||||
if (0.0f > result)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for(int p = 0; p < 4; ++p)
|
||||
{
|
||||
float result = dot(sides[p].n, point) + sides[p].d;
|
||||
if(result < 0)
|
||||
result = dot(sides[p].n, point) + sides[p].d;
|
||||
if(0.0f > result)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ struct PointLight : ILightEnv
|
||||
float3 lightDir_WS = position_WS.xyz - params.position_WS;
|
||||
float d = length(lightDir_WS);
|
||||
float illuminance = max(1 - d / colorRange.w, 0);
|
||||
return brdf.evaluate(params.tbn, params.viewDir_WS, normalize(lightDir_WS), colorRange.xyz);
|
||||
return illuminance * brdf.evaluate(params.tbn, params.viewDir_WS, normalize(lightDir_WS), colorRange.xyz);
|
||||
}
|
||||
|
||||
bool insidePlane(Plane plane)
|
||||
|
||||
Reference in New Issue
Block a user