[Bf-blender-cvs] [c50f0fc] cycles_panorama_experiments: Merge branch 'master' into cycles_panorama_experiments

Sergey Sharybin noreply at git.blender.org
Fri May 6 13:44:30 CEST 2016


Commit: c50f0fc1a3354426609b8753c3ca3c233bae304b
Author: Sergey Sharybin
Date:   Fri May 6 12:20:38 2016 +0200
Branches: cycles_panorama_experiments
https://developer.blender.org/rBc50f0fc1a3354426609b8753c3ca3c233bae304b

Merge branch 'master' into cycles_panorama_experiments

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



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

diff --cc intern/cycles/render/image.h
index f42b3f8,64798d7..a86586f
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@@ -112,11 -84,8 +84,11 @@@ public
  		int users;
  	};
  
 +	/* Get resolution of an image denoted by it's slot.. */
 +	int2 get_image_resolution(int slot);
 +
  private:
- 	int tex_num_images;
+ 	int tex_num_byte_images;
  	int tex_num_float_images;
  	int tex_image_byte_start;
  	thread_mutex device_mutex;
diff --cc intern/cycles/render/nodes.cpp
index ddf85b8,7066164..390e16c
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@@ -488,38 -493,20 +495,27 @@@ void EnvironmentTextureNode::compile(SV
  		is_float = (int)is_float_bool;
  	}
  
- 	if(!color_out->links.empty())
- 		compiler.stack_assign(color_out);
- 	if(!alpha_out->links.empty())
- 		compiler.stack_assign(alpha_out);
- 	
  	if(slot != -1) {
- 		compiler.stack_assign(vector_in);
- 
  		int srgb = (is_linear || color_space != "Color")? 0: 1;
- 		int vector_offset = vector_in->stack_offset;
- 
- 		if(!tex_mapping.skip()) {
- 			vector_offset = compiler.stack_find_offset(SHADER_SOCKET_VECTOR);
- 			tex_mapping.compile(compiler, vector_in->stack_offset, vector_offset);
- 		}
+ 		int vector_offset = tex_mapping.compile_begin(compiler, vector_in);
  
  		compiler.add_node(NODE_TEX_ENVIRONMENT,
- 		                  slot,
- 		                  compiler.encode_uchar4(vector_offset,
- 		                                         color_out->stack_offset,
- 		                                         alpha_out->stack_offset,
- 		                                         srgb),
- 		                  projection_enum[projection]);
+ 			slot,
+ 			compiler.encode_uchar4(
+ 				vector_offset,
+ 				compiler.stack_assign_if_linked(color_out),
+ 				compiler.stack_assign_if_linked(alpha_out),
+ 				srgb),
+ 			projection_enum[projection]);
 -	
 +		/* TODO(sergey): Get rid of hardcoded constant. */
 +		if(projection_enum[projection] == 2) {
 +			int2 resolution = image_manager->get_image_resolution(slot);
 +			compiler.add_node(NODE_TEX_ENVIRONMENT,
- 			                  resolution.x,
- 			                  resolution.y);
++		                      resolution.x,
++		                      resolution.y);
 +		}
- 		if(vector_offset != vector_in->stack_offset)
- 			compiler.stack_clear_offset(vector_in->type, vector_offset);
++
+ 		tex_mapping.compile_end(compiler, vector_in, vector_offset);
  	}
  	else {
  		/* image not found */
diff --cc intern/cycles/render/session.h
index cb5a32a,02d97ce..c1e0acf
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@@ -73,8 -72,7 +73,8 @@@ public
  
  		progressive = false;
  		experimental = false;
- 		samples = USHRT_MAX;
+ 		samples = INT_MAX;
 +		pole_samples = 0;
  		tile_size = make_int2(64, 64);
  		start_resolution = INT_MAX;
  		threads = 0;




More information about the Bf-blender-cvs mailing list