From bae896691aa3d7bb2a75292da3cc490894996b01 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 28 Aug 2011 13:55:59 +0000 Subject: Cycles: * Add alpha pass output, to use set Transparent option in Film panel. * Add Holdout closure (OSL terminology), this is like the Sky option in the internal renderer, objects with this closure show the background / zero alpha. * Add option to use Gaussian instead of Box pixel filter in the UI. * Remove camera response curves for now, they don't really belong here in the pipeline, should be moved to compositor. * Output full float values for rendering now, previously was only byte precision. * Add a patch from Thomas to get a preview passes option, but still disabled because it isn't quite working right yet. * CUDA: don't compile shader graph evaluation inline. * Convert tabs to spaces in python files. --- intern/cycles/render/film.cpp | 72 +------------------------------------------ 1 file changed, 1 insertion(+), 71 deletions(-) (limited to 'intern/cycles/render/film.cpp') diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index 05874244605..657abd97f70 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -19,30 +19,13 @@ #include "camera.h" #include "device.h" #include "film.h" -#include "film_response.h" #include "scene.h" CCL_NAMESPACE_BEGIN -static FilmResponseType find_response_type(const string& name) -{ - if(name == "" || name == "None") - return FILM_RESPONSE_NONE; - - for(size_t i = 0; i < FILM_RESPONSE_NUM; i++) { - FilmResponse *curve = &FILM_RESPONSE[i]; - if(curve->name == name) - return (FilmResponseType)i; - } - - return FILM_RESPONSE_NONE; -} - Film::Film() { exposure = 0.8f; - response = "Advantix 400"; - last_response = ""; need_update = true; } @@ -50,18 +33,6 @@ Film::~Film() { } -#if 0 -static void generate_python_enum() -{ - for(size_t i = 0; i < FILM_RESPONSE_NUM; i++) { - FilmResponse *curve = &FILM_RESPONSE[i]; - /*if(i == 0 || strcmp(curve->brand, FILM_RESPONSE[i-1].brand)) - printf("(\"\", \"%s\", \"\"),\n", curve->brand);*/ - printf("(\"%s\", \"%s %s\", \"\"),\n", curve->name, curve->brand, curve->name); - } -} -#endif - void Film::device_update(Device *device, DeviceScene *dscene) { if(!need_update) @@ -72,57 +43,16 @@ void Film::device_update(Device *device, DeviceScene *dscene) /* update __data */ kfilm->exposure = exposure; - FilmResponseType response_type = find_response_type(response); - - /* update __response_curves */ - if(response != last_response) { - device_free(device, dscene); - - if(response_type != FILM_RESPONSE_NONE) { - FilmResponse *curve = &FILM_RESPONSE[response_type]; - size_t response_curve_size = FILM_RESPONSE_SIZE; - - dscene->response_curve_R.copy(curve->B_R, response_curve_size); - - if(curve->rgb) { - dscene->response_curve_G.copy(curve->B_G, response_curve_size); - dscene->response_curve_B.copy(curve->B_B, response_curve_size); - } - else { - dscene->response_curve_G.copy(curve->B_R, response_curve_size); - dscene->response_curve_B.copy(curve->B_R, response_curve_size); - } - - device->tex_alloc("__response_curve_R", dscene->response_curve_R, true); - device->tex_alloc("__response_curve_G", dscene->response_curve_G, true); - device->tex_alloc("__response_curve_B", dscene->response_curve_B, true); - } - - last_response = response; - } - - kfilm->use_response_curve = (response_type != FILM_RESPONSE_NONE); - need_update = false; } void Film::device_free(Device *device, DeviceScene *dscene) { - device->tex_free(dscene->response_curve_R); - device->tex_free(dscene->response_curve_G); - device->tex_free(dscene->response_curve_B); - - dscene->response_curve_R.clear(); - dscene->response_curve_G.clear(); - dscene->response_curve_B.clear(); - - last_response = ""; } bool Film::modified(const Film& film) { - return !(response == film.response && - exposure == film.exposure && + return !(exposure == film.exposure && pass == film.pass); } -- cgit v1.2.3