This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform sampler2D tDiffuse; | |
varying vec2 vUv; | |
float map(float value, float min1, float max1, float min2, float max2) { | |
return min2 + (value - min1) * (max2 - min2) / (max1 - min1); | |
} | |
void main() { | |
vec2 doubleUv = vUv * 2.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import pow | |
def x(v): | |
v /= 255 | |
res = v / 12.92 if v <= 0.03928 else pow( (v + 0.055) / 1.055, 2.4 ) | |
return res | |
def luminance(r, g, b): |