Sha256: 487d32dae5a04b8180cf8c8819e0d8d43c390e7228ff697e5b6d638154962fac

Contents?: true

Size: 817 Bytes

Versions: 3

Compression:

Stored size: 817 Bytes

Contents

//This file is automatically rebuilt by the Cesium build process.
/*global define*/
define(function() {
"use strict";
return "uniform sampler2D u_texture;\n\
uniform float u_avgLuminance;\n\
uniform float u_threshold;\n\
uniform float u_offset;\n\
varying vec2 v_textureCoordinates;\n\
float key(float avg)\n\
{\n\
float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n\
return max(0.0, guess) + 0.1;\n\
}\n\
void main()\n\
{\n\
vec4 color = texture2D(u_texture, v_textureCoordinates);\n\
vec3 xyz = czm_RGBToXYZ(color.rgb);\n\
float luminance = xyz.r;\n\
float scaledLum = key(u_avgLuminance) * luminance / u_avgLuminance;\n\
float brightLum = max(scaledLum - u_threshold, 0.0);\n\
float brightness = brightLum / (u_offset + brightLum);\n\
xyz.r = brightness;\n\
gl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n\
}\n\
";
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cesium-0.20.0 app/assets/javascripts/Shaders/PostProcessFilters/BrightPass.js
cesium-0.19.0 app/assets/javascripts/Shaders/PostProcessFilters/BrightPass.js
cesium-0.18.0 app/assets/javascripts/Shaders/PostProcessFilters/BrightPass.js