Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-08-28 17:55:59 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-08-28 17:55:59 +0400
commitbae896691aa3d7bb2a75292da3cc490894996b01 (patch)
tree9c3703f11ccdf76c575c2ea18b70dee1ff665913 /intern/cycles/render/film.cpp
parentd48e4fc92be346810baa8cac595ab0a735882a87 (diff)
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.
Diffstat (limited to 'intern/cycles/render/film.cpp')
-rw-r--r--intern/cycles/render/film.cpp72
1 files changed, 1 insertions, 71 deletions
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);
}