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:
-rw-r--r--source/blender/render/intern/source/gammaCorrectionTables.c4
-rw-r--r--source/blender/render/intern/source/rendercore.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c
index 0e27aacd9e3..9273aa899ee 100644
--- a/source/blender/render/intern/source/gammaCorrectionTables.c
+++ b/source/blender/render/intern/source/gammaCorrectionTables.c
@@ -40,8 +40,8 @@
#include <config.h>
#endif
-/* There are two parts here: one for the old renderer, one for the unified */
-/* renderer. we start with the latter. */
+/* WARNING; optimized, cannot be used to do gamma(invgamma()) and expect */
+/* result remain identical (ton) */
/* Default gamma. For most CRTs, gamma ranges from 2.2 to 2.5 (Foley), so */
/* 2.35 seems appropriate enough. Experience teaches a different number */
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 75f106be7ab..e73c1a63413 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -451,9 +451,9 @@ static void scanlinehaloPS(int *rectz, long *rectdelta, float *rowbuf, short ys)
float *buf= rowbuf;
int xt;
for(xt=0; xt<R.rectx; xt++, buf+=4) {
- buf[0]= invGammaCorrect(buf[0]);
- buf[1]= invGammaCorrect(buf[1]);
- buf[2]= invGammaCorrect(buf[2]);
+ buf[0]= sqrt(buf[0]); // invers gamma 2.0
+ buf[1]= sqrt(buf[1]);
+ buf[2]= sqrt(buf[2]);
}
didgamma= 1;
}
@@ -526,9 +526,9 @@ static void scanlinehaloPS(int *rectz, long *rectdelta, float *rowbuf, short ys)
float *buf= rowbuf;
int xt;
for(xt=0; xt<R.rectx; xt++, buf+=4) {
- buf[0]= gammaCorrect(buf[0]);
- buf[1]= gammaCorrect(buf[1]);
- buf[2]= gammaCorrect(buf[2]);
+ buf[0]*= (buf[0]); // gamma 2.0
+ buf[1]*= (buf[1]);
+ buf[2]*= (buf[2]);
}
}