[Bf-blender-cvs] [d97c3bc7ad1] blender2.8: Merge branch 'master' into blender2.8

Dalai Felinto noreply at git.blender.org
Mon Jul 3 15:19:10 CEST 2017


Commit: d97c3bc7ad13cb9e3ec2248ce035a62c28ac70f8
Author: Dalai Felinto
Date:   Mon Jul 3 15:07:14 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBd97c3bc7ad13cb9e3ec2248ce035a62c28ac70f8

Merge branch 'master' into blender2.8

===================================================================



===================================================================

diff --cc source/blender/gpu/shaders/gpu_shader_material.glsl
index 0c36d6ca618,67a099159c5..1f9ab45e556
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@@ -2684,13 -2623,9 +2684,13 @@@ void node_bsdf_principled(vec4 base_col
  	float specular_tint, float roughness, float anisotropic, float anisotropic_rotation, float sheen, float sheen_tint, float clearcoat,
  	float clearcoat_roughness, float ior, float transmission, float transmission_roughness, vec3 N, vec3 CN, vec3 T, vec3 I, out vec4 result)
  {
 +	vec3 X, Y;
 +	float ax, ay;
 +	prepare_tangent(anisotropic, anisotropic_rotation, roughness, N, T, X, Y, ax, ay);
 +
  	/* ambient light */
  	// TODO: set ambient light to an appropriate value
- 	vec3 L = vec3(mix(0.1, 0.03, metallic)) * base_color.rgb;
+ 	vec3 L = mix(0.1, 0.03, metallic) * mix(base_color.rgb, subsurface_color.rgb, subsurface * (1.0 - metallic));
  
  	float eta = (2.0 / (1.0 - sqrt(0.08 * specular))) - 1.0;
  
@@@ -2703,12 -2662,13 +2703,13 @@@
  
  	/* directional lights */
  	for (int i = 0; i < NUM_LIGHTS; i++) {
 -		vec3 light_position_world = gl_LightSource[i].position.xyz;
 +		vec3 light_position_world = glLightSource[i].position.xyz;
- 		vec3 light_position = normalize(NormalMatrix * light_position_world);
+ 		vec3 light_position = normalize(light_position_world);
  
  		vec3 H = normalize(light_position + V);
  
 -		vec3 light_diffuse = gl_LightSource[i].diffuse.rgb;
 -		vec3 light_specular = gl_LightSource[i].specular.rgb;
++		vec3 light_diffuse = glLightSource[i].diffuse.rgb;
 +		vec3 light_specular = glLightSource[i].specular.rgb;
  
  		float NdotL = dot(N, light_position);
  		float NdotV = dot(N, V);




More information about the Bf-blender-cvs mailing list