File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 11#include < common>
22
3+ // https://en.wikipedia.org/wiki/Relative_luminance
4+ float linearToRelativeLuminance(const in vec3 color) {
5+
6+ vec3 weights = vec3 (0.2126 , 0.7152 , 0.0722 );
7+
8+ return dot (weights, color.rgb);
9+
10+ }
11+
312uniform sampler2D tDiffuse;
413uniform sampler2D tDepth;
514
Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ varying vec2 vUv;
2020
2121 #include < common>
2222
23+ // https://en.wikipedia.org/wiki/Relative_luminance
24+ float linearToRelativeLuminance(const in vec3 color) {
25+
26+ vec3 weights = vec3 (0.2126 , 0.7152 , 0.0722 );
27+
28+ return dot (weights, color.rgb);
29+
30+ }
31+
2332 uniform float greyscaleIntensity;
2433
2534#elif defined(SEPIA)
Original file line number Diff line number Diff line change 11#include < common>
22
3+ // https://en.wikipedia.org/wiki/Relative_luminance
4+ float linearToRelativeLuminance(const in vec3 color) {
5+
6+ vec3 weights = vec3 (0.2126 , 0.7152 , 0.0722 );
7+
8+ return dot (weights, color.rgb);
9+
10+ }
11+
312uniform sampler2D tDiffuse;
413uniform float distinction;
514uniform vec2 range;
Original file line number Diff line number Diff line change 11#include < common>
22
3+ // https://en.wikipedia.org/wiki/Relative_luminance
4+ float linearToRelativeLuminance(const in vec3 color) {
5+
6+ vec3 weights = vec3 (0.2126 , 0.7152 , 0.0722 );
7+
8+ return dot (weights, color.rgb);
9+
10+ }
11+
312uniform sampler2D tDiffuse;
413uniform float middleGrey;
514uniform float maxLuminance;
You can’t perform that action at this time.
0 commit comments