Tweak IBL

This commit is contained in:
Vincent Lejeune
2014-12-08 19:36:23 +01:00
parent 72fdf816e7
commit 2667791621
2 changed files with 3 additions and 2 deletions

View File

@@ -22,5 +22,5 @@ void main(void)
vec3 eyedir = -normalize(xpos.xyz);
float specval = texture(ntex, uv).z;
Spec = vec4(SpecularIBL(normal, eyedir, specval), 1.);
Spec = vec4(.25 * SpecularIBL(normal, eyedir, specval), 1.);
}

View File

@@ -286,7 +286,8 @@ GLuint generateSpecularCubemap(GLuint probe)
{
// Blinn Phong can be approximated by Phong with 4x the specular coefficient
// See http://seblagarde.wordpress.com/2012/03/29/relationship-between-phong-and-blinn-lighting-model/
float roughness = (8 - level) * 4 * pow(2.f, 10.f) / 8.f;
// NOTE : Removed because it makes too sharp reflexion
float roughness = (8 - level) * pow(2.f, 10.f) / 8.f;
float viewportSize = float(1 << (8 - level));
float *tmp = new float[2048];