diff options
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/buffers.h | 6 | ||||
-rw-r--r-- | intern/cycles/render/film.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/render/graph.cpp | 12 | ||||
-rw-r--r-- | intern/cycles/render/image.cpp | 12 | ||||
-rw-r--r-- | intern/cycles/render/light.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/render/mesh.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/render/object.cpp | 8 | ||||
-rw-r--r-- | intern/cycles/render/osl.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/render/session.cpp | 28 | ||||
-rw-r--r-- | intern/cycles/render/shader.cpp | 8 | ||||
-rw-r--r-- | intern/cycles/render/shader.h | 6 | ||||
-rw-r--r-- | intern/cycles/render/svm.cpp | 22 |
12 files changed, 57 insertions, 57 deletions
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h index 77ad4a5a4b0..78712ed89ef 100644 --- a/intern/cycles/render/buffers.h +++ b/intern/cycles/render/buffers.h @@ -35,7 +35,7 @@ class Device; struct float4; /* Buffer Parameters - Size of render buffer and how it fits in the full image (border render). */ + * Size of render buffer and how it fits in the full image (border render). */ class BufferParams { public: @@ -98,8 +98,8 @@ public: /* buffer parameters */ BufferParams params; /* dimensions for how much of the buffer is actually ready for display. - with progressive render we can be using only a subset of the buffer. - if these are zero, it means nothing can be drawn yet */ + * with progressive render we can be using only a subset of the buffer. + * if these are zero, it means nothing can be drawn yet */ int draw_width, draw_height; /* draw alpha channel? */ bool transparent; diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index 878aa87510e..035821fadde 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -142,7 +142,7 @@ void Pass::add(PassType type, vector<Pass>& passes) passes.push_back(pass); /* order from by components, to ensure alignment so passes with size 4 - come first and then passes with size 1 */ + * come first and then passes with size 1 */ sort(passes.begin(), passes.end(), compare_pass_order); if(pass.divide_type != PASS_NONE) diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index a0e7af66100..34c8879aa1f 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -375,8 +375,8 @@ void ShaderGraph::break_cycles(ShaderNode *node, vector<bool>& visited, vector<b void ShaderGraph::clean() { /* we do two things here: find cycles and break them, and remove unused - nodes that don't feed into the output. how cycles are broken is - undefined, they are invalid input, the important thing is to not crash */ + * nodes that don't feed into the output. how cycles are broken is + * undefined, they are invalid input, the important thing is to not crash */ vector<bool> removed(nodes.size(), false); vector<bool> visited(nodes.size(), false); @@ -495,7 +495,7 @@ void ShaderGraph::bump_from_displacement() copy_nodes(nodes_displace, nodes_dy); /* mark nodes to indicate they are use for bump computation, so - that any texture coordinates are shifted by dx/dy when sampling */ + * that any texture coordinates are shifted by dx/dy when sampling */ foreach(NodePair& pair, nodes_center) pair.second->bump = SHADER_BUMP_CENTER; foreach(NodePair& pair, nodes_dx) @@ -516,15 +516,15 @@ void ShaderGraph::bump_from_displacement() connect(out_dy, bump->input("SampleY")); /* connect bump output to normal input nodes that aren't set yet. actually - this will only set the normal input to the geometry node that we created - and connected to all other normal inputs already. */ + * this will only set the normal input to the geometry node that we created + * and connected to all other normal inputs already. */ foreach(ShaderNode *node, nodes) foreach(ShaderInput *input, node->inputs) if(!input->link && input->default_value == ShaderInput::NORMAL) connect(bump->output("Normal"), input); /* finally, add the copied nodes to the graph. we can't do this earlier - because we would create dependency cycles in the above loop */ + * because we would create dependency cycles in the above loop */ foreach(NodePair& pair, nodes_center) add(pair.second); foreach(NodePair& pair, nodes_dx) diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index 6417d0e2103..dc20dbdbea2 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -66,7 +66,7 @@ static bool is_float_image(const string& filename) if(in->open(filename, spec)) { /* check the main format, and channel formats; - if any take up more than one byte, we'll need a float texture slot */ + * if any take up more than one byte, we'll need a float texture slot */ if(spec.format.basesize() > 1) is_float = true; @@ -171,8 +171,8 @@ void ImageManager::remove_image(const string& filename) assert(images[slot]->users >= 0); /* don't remove immediately, rather do it all together later on. one of - the reasons for this is that on shader changes we add and remove nodes - that use them, but we do not want to reload the image all the time. */ + * the reasons for this is that on shader changes we add and remove nodes + * that use them, but we do not want to reload the image all the time. */ if(images[slot]->users == 0) need_update = true; @@ -189,8 +189,8 @@ void ImageManager::remove_image(const string& filename) assert(float_images[slot]->users >= 0); /* don't remove immediately, rather do it all together later on. one of - the reasons for this is that on shader changes we add and remove nodes - that use them, but we do not want to reload the image all the time. */ + * the reasons for this is that on shader changes we add and remove nodes + * that use them, but we do not want to reload the image all the time. */ if(float_images[slot]->users == 0) need_update = true; @@ -483,7 +483,7 @@ void ImageManager::device_update(Device *device, DeviceScene *dscene, Progress& void ImageManager::device_pack_images(Device *device, DeviceScene *dscene, Progress& progess) { /* for OpenCL, we pack all image textures inside a single big texture, and - will do our own interpolation in the kernel */ + * will do our own interpolation in the kernel */ size_t size = 0; for(size_t slot = 0; slot < images.size(); slot++) { diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index 1bf1cde4a1c..e918de990c2 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -362,7 +362,7 @@ void LightManager::device_update_background(Device *device, DeviceScene *dscene, float cdf_total = cond_cdf[i * cdf_count + res - 1].y + cond_cdf[i * cdf_count + res - 1].x / res; /* stuff the total into the brightness value for the last entry, because - we are going to normalize the CDFs to 0.0 to 1.0 afterwards */ + * we are going to normalize the CDFs to 0.0 to 1.0 afterwards */ cond_cdf[i * cdf_count + res].x = cdf_total; if(cdf_total > 0.0f) diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index cabbd5760c2..8f5f2647ebf 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -474,7 +474,7 @@ void MeshManager::device_update_attributes(Device *device, DeviceScene *dscene, AttributeRequestSet& attributes = mesh_attributes[i]; /* todo: we now store std and name attributes from requests even if - they actually refer to the same mesh attributes, optimize */ + * they actually refer to the same mesh attributes, optimize */ foreach(AttributeRequest& req, attributes.requests) { Attribute *mattr = mesh->attributes.find(req); @@ -493,7 +493,7 @@ void MeshManager::device_update_attributes(Device *device, DeviceScene *dscene, } /* we abuse AttributeRequest to pass on info like element and - offset, it doesn't really make sense but is convenient */ + * offset, it doesn't really make sense but is convenient */ /* store element and type */ if(mattr->element == Attribute::VERTEX) @@ -528,7 +528,7 @@ void MeshManager::device_update_attributes(Device *device, DeviceScene *dscene, } /* mesh vertex/triangle index is global, not per object, so we sneak - a correction for that in here */ + * a correction for that in here */ if(req.element == ATTR_ELEMENT_VERTEX) req.offset -= mesh->vert_offset; else if(mattr->element == Attribute::FACE) diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 259a0d25bcc..376a7911fc9 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -89,7 +89,7 @@ void Object::apply_transform() Transform ntfm = transform_transpose(transform_inverse(tfm)); /* we keep normals pointing in same direction on negative scale, notify - mesh about this in it (re)calculates normals */ + * mesh about this in it (re)calculates normals */ if(transform_negative_scale(tfm)) mesh->transform_negative_scaled = true; @@ -161,7 +161,7 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene Transform itfm = transform_inverse(tfm); /* compute surface area. for uniform scale we can do avoid the many - transform calls and share computation for instances */ + * transform calls and share computation for instances */ /* todo: correct for displacement, and move to a better place */ float uniform_scale; float surface_area = 0.0f; @@ -206,8 +206,8 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene if(need_motion == Scene::MOTION_PASS) { /* motion transformations, is world/object space depending if mesh - comes with deformed position in object space, or if we transform - the shading point in world space */ + * comes with deformed position in object space, or if we transform + * the shading point in world space */ Transform mtfm_pre = ob->motion.pre; Transform mtfm_post = ob->motion.post; diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index b0173334c76..04af9b48280 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -167,7 +167,7 @@ string OSLCompiler::compatible_name(const char *name) bool OSLCompiler::node_skip_input(ShaderNode *node, ShaderInput *input) { /* exception for output node, only one input is actually used - depending on the current shader type */ + * depending on the current shader type */ if(node->name == ustring("output")) { if(strcmp(input->name, "Surface") == 0 && current_type != SHADER_TYPE_SURFACE) diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index 173d73ea2c7..a9f7e5beb56 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -116,8 +116,8 @@ bool Session::ready_to_reset() void Session::reset_gpu(BufferParams& buffer_params, int samples) { /* block for buffer acces and reset immediately. we can't do this - in the thread, because we need to allocate an OpenGL buffer, and - that only works in the main thread */ + * in the thread, because we need to allocate an OpenGL buffer, and + * that only works in the main thread */ thread_scoped_lock display_lock(display->mutex); thread_scoped_lock buffers_lock(buffers->mutex); @@ -140,10 +140,10 @@ bool Session::draw_gpu(BufferParams& buffer_params) /* first check we already rendered something */ if(gpu_draw_ready) { /* then verify the buffers have the expected size, so we don't - draw previous results in a resized window */ + * draw previous results in a resized window */ if(!buffer_params.modified(display->params)) { /* for CUDA we need to do tonemapping still, since we can - only access GL buffers from the main thread */ + * only access GL buffers from the main thread */ if(gpu_need_tonemap) { thread_scoped_lock buffers_lock(buffers->mutex); tonemap(); @@ -185,7 +185,7 @@ void Session::run_gpu() } else { /* if in interactive mode, and we are either paused or done for now, - wait for pause condition notify to wake up again */ + * wait for pause condition notify to wake up again */ thread_scoped_lock pause_lock(pause_mutex); if(pause || no_tiles) { @@ -224,8 +224,8 @@ void Session::run_gpu() if(!no_tiles) { /* buffers mutex is locked entirely while rendering each - sample, and released/reacquired on each iteration to allow - reset and draw in between */ + * sample, and released/reacquired on each iteration to allow + * reset and draw in between */ thread_scoped_lock buffers_lock(buffers->mutex); /* update status and timing */ @@ -294,7 +294,7 @@ bool Session::draw_cpu(BufferParams& buffer_params) /* first check we already rendered something */ if(display->draw_ready()) { /* then verify the buffers have the expected size, so we don't - draw previous results in a resized window */ + * draw previous results in a resized window */ if(!buffer_params.modified(display->params)) { display->draw(device); @@ -334,7 +334,7 @@ void Session::run_cpu() } else { /* if in interactive mode, and we are either paused or done for now, - wait for pause condition notify to wake up again */ + * wait for pause condition notify to wake up again */ thread_scoped_lock pause_lock(pause_mutex); if(pause || no_tiles) { @@ -362,8 +362,8 @@ void Session::run_cpu() if(!no_tiles) { /* buffers mutex is locked entirely while rendering each - sample, and released/reacquired on each iteration to allow - reset and draw in between */ + * sample, and released/reacquired on each iteration to allow + * reset and draw in between */ thread_scoped_lock buffers_lock(buffers->mutex); /* update scene */ @@ -406,7 +406,7 @@ void Session::run_cpu() } else if(need_tonemap) { /* tonemap only if we do not reset, we don't we don't - want to show the result of an incomplete sample*/ + * wan't to show the result of an incomplete sample*/ tonemap(); } @@ -535,8 +535,8 @@ void Session::update_scene() progress.set_status("Updating Scene"); /* update camera if dimensions changed for progressive render. the camera - knows nothing about progressive or cropped rendering, it just gets the - image dimensions passed in */ + * knows nothing about progressive or cropped rendering, it just gets the + * image dimensions passed in */ Camera *cam = scene->camera; int width = tile_manager.state.buffer.full_width; int height = tile_manager.state.buffer.full_height; diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index f50709146ef..fae1d6bd81c 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -81,9 +81,9 @@ void Shader::tag_update(Scene *scene) scene->light_manager->need_update = true; /* get requested attributes. this could be optimized by pruning unused - nodes here already, but that's the job of the shader manager currently, - and may not be so great for interactive rendering where you temporarily - disconnect a node */ + * nodes here already, but that's the job of the shader manager currently, + * and may not be so great for interactive rendering where you temporarily + * disconnect a node */ AttributeRequestSet prev_attributes = attributes; attributes.clear(); @@ -91,7 +91,7 @@ void Shader::tag_update(Scene *scene) node->attributes(&attributes); /* compare if the attributes changed, mesh manager will check - need_update_attributes, update the relevant meshes and clear it. */ + * need_update_attributes, update the relevant meshes and clear it. */ if(attributes.modified(prev_attributes)) { need_update_attributes = true; scene->mesh_manager->need_update = true; diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h index 48d517ce21a..02788008060 100644 --- a/intern/cycles/render/shader.h +++ b/intern/cycles/render/shader.h @@ -53,8 +53,8 @@ public: ShaderGraph *graph; /* shader graph with auto bump mapping included, we compile two shaders, - with and without bump, because the displacement method is a mesh - level setting, so we need to handle both */ + * with and without bump, because the displacement method is a mesh + * level setting, so we need to handle both */ ShaderGraph *graph_bump; /* sampling */ @@ -109,7 +109,7 @@ public: int get_shader_id(uint shader, Mesh *mesh = NULL, bool smooth = false); /* add default shaders to scene, to use as default for things that don't - have any shader assigned explicitly */ + * have any shader assigned explicitly */ static void add_default(Scene *scene); protected: diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp index 1ff3ac20d50..e160f1c93af 100644 --- a/intern/cycles/render/svm.cpp +++ b/intern/cycles/render/svm.cpp @@ -251,11 +251,11 @@ void SVMCompiler::stack_link(ShaderInput *input, ShaderOutput *output) void SVMCompiler::stack_clear_users(ShaderNode *node, set<ShaderNode*>& done) { /* optimization we should add: - find and lower user counts for outputs for which all inputs are done. - this is done before the node is compiled, under the assumption that the - node will first load all inputs from the stack and then writes its - outputs. this used to work, but was disabled because it gave trouble - with inputs getting stack positions assigned */ + * find and lower user counts for outputs for which all inputs are done. + * this is done before the node is compiled, under the assumption that the + * node will first load all inputs from the stack and then writes its + * outputs. this used to work, but was disabled because it gave trouble + * with inputs getting stack positions assigned */ foreach(ShaderInput *input, node->inputs) { ShaderOutput *output = input->link; @@ -418,8 +418,8 @@ void SVMCompiler::generate_closure(ShaderNode *node, set<ShaderNode*>& done) add_node(NODE_ADD_CLOSURE, 0, 0, 0); /* generate code for closure 1 - note we backup all compiler state and restore it afterwards, so one - closure choice doesn't influence the other*/ + * note we backup all compiler state and restore it afterwards, so one + * closure choice doesn't influence the other*/ if(cl1in->link) { StackBackup backup; stack_backup(backup, done); @@ -448,7 +448,7 @@ void SVMCompiler::generate_closure(ShaderNode *node, set<ShaderNode*>& done) add_node(NODE_END, 0, 0, 0); /* set jump for mix node, -1 because offset is already - incremented when this jump is added to it */ + * incremented when this jump is added to it */ svm_nodes[mix_offset].z = cl2_offset - mix_offset - 1; done.insert(node); @@ -482,9 +482,9 @@ void SVMCompiler::generate_closure(ShaderNode *node, set<ShaderNode*>& done) void SVMCompiler::generate_multi_closure(ShaderNode *node, set<ShaderNode*>& done, uint in_offset) { /* todo: the weaks point here is that unlike the single closure sampling - we will evaluate all nodes even if they are used as input for closures - that are unused. it's not clear what would be the best way to skip such - nodes at runtime, especially if they are tangled up */ + * we will evaluate all nodes even if they are used as input for closures + * that are unused. it's not clear what would be the best way to skip such + * nodes at runtime, especially if they are tangled up */ if(node->name == ustring("mix_closure") || node->name == ustring("add_closure")) { ShaderInput *fin = node->input("Fac"); |