Skip to content

Commit

Permalink
Probe intensity
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Oct 5, 2018
1 parent 9888514 commit c91a9c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Shaders/probe_cubemap/probe_cubemap.frag.glsl
Expand Up @@ -7,7 +7,7 @@ uniform samplerCube probeTex;
uniform sampler2D gbuffer0;
uniform sampler2D gbuffer1;
uniform mat4 invVP;
// uniform vec3 probep;
uniform vec3 probep;
uniform vec3 eye;

in vec4 wvpposition;
Expand Down Expand Up @@ -45,7 +45,6 @@ void main() {

vec3 v = wp - eye;

// float intensity = clamp((1.0 - roughness) * dot(n, proben), 0.0, 1.0);
float intensity = 1.0 - roughness;
float intensity = clamp((1.0 - roughness) * dot(wp - probep, n), 0.0, 1.0);
fragColor.rgb = texture(probeTex, reflect(v, n)).rgb * intensity;
}

0 comments on commit c91a9c1

Please sign in to comment.