diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-06-01 22:38:07 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-06-01 22:38:07 -0300 |
commit | e79d7149ea751e32312cb8625548085d4537c591 (patch) | |
tree | 1f5341a8191b6db1ccbb3320191d8114a36a9f3e /drivers/gles3/shaders/scene.glsl | |
parent | c03131fc9f7aef119f864cc266330855134feb62 (diff) |
GI probes working back again
Diffstat (limited to 'drivers/gles3/shaders/scene.glsl')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 5c65e10dbe..f35e04c5e4 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -672,7 +672,7 @@ LIGHT_SHADER_CODE diffuse+= light_color * diffuse_color * lightScatter * viewScatter * energyFactor; } #else - + //lambert diffuse += dotNL * light_color * diffuse_color; #endif @@ -1020,7 +1020,7 @@ void reflection_process(int idx, vec3 vertex, vec3 normal,vec3 binormal, vec3 ta #ifdef USE_GI_PROBES -uniform mediump sampler3D gi_probe1; //texunit:-11 +uniform mediump sampler3D gi_probe1; //texunit:-10 uniform highp mat4 gi_probe_xform1; uniform highp vec3 gi_probe_bounds1; uniform highp vec3 gi_probe_cell_size1; @@ -1028,7 +1028,7 @@ uniform highp float gi_probe_multiplier1; uniform highp float gi_probe_bias1; uniform bool gi_probe_blend_ambient1; -uniform mediump sampler3D gi_probe2; //texunit:-10 +uniform mediump sampler3D gi_probe2; //texunit:-11 uniform highp mat4 gi_probe_xform2; uniform highp vec3 gi_probe_bounds2; uniform highp vec3 gi_probe_cell_size2; @@ -1345,7 +1345,7 @@ FRAGMENT_SHADER_CODE { //read radiance from dual paraboloid vec3 ref_vec = reflect(-eye_vec,normal); //2.0 * ndotv * normal - view; // reflect(v, n); - ref_vec=normalize((radiance_inverse_xform * vec4(ref_vec,0.0)).xyz); + ref_vec=normalize((radiance_inverse_xform * vec4(ref_vec,0.0)).xyz); vec3 radiance = textureDualParabolod(radiance_map,ref_vec,lod) * bg_energy; specular_light = radiance; |