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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
index 3b8a044154b..9c765ee72b6 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
@@ -12,29 +12,29 @@ out vec4 FragColor;
float brightness(vec3 c)
{
- return max(max(c.r, c.g), c.b);
+ return max(max(c.r, c.g), c.b);
}
void main()
{
#if 0
- /* Reconstructing Target uvs like this avoid missing pixels if NPO2 */
- vec2 uvs = gl_FragCoord.xy * 2.0 / vec2(textureSize(source, 0));
+ /* Reconstructing Target uvs like this avoid missing pixels if NPO2 */
+ vec2 uvs = gl_FragCoord.xy * 2.0 / vec2(textureSize(source, 0));
- FragColor = textureLod(source, vec3(uvs, layer), 0.0);
+ FragColor = textureLod(source, vec3(uvs, layer), 0.0);
#else
- vec2 texel_size = 1.0 / vec2(textureSize(source, 0));
- vec2 uvs = gl_FragCoord.xy * 2.0 * texel_size;
- vec4 ofs = texel_size.xyxy * vec4(0.75, 0.75, -0.75, -0.75);
-
- FragColor = textureLod(source, vec3(uvs + ofs.xy, layer), 0.0);
- FragColor += textureLod(source, vec3(uvs + ofs.xw, layer), 0.0);
- FragColor += textureLod(source, vec3(uvs + ofs.zy, layer), 0.0);
- FragColor += textureLod(source, vec3(uvs + ofs.zw, layer), 0.0);
- FragColor *= 0.25;
-
- /* Clamped brightness. */
- float luma = max(1e-8, brightness(FragColor.rgb));
- FragColor *= 1.0 - max(0.0, luma - fireflyFactor) / luma;
+ vec2 texel_size = 1.0 / vec2(textureSize(source, 0));
+ vec2 uvs = gl_FragCoord.xy * 2.0 * texel_size;
+ vec4 ofs = texel_size.xyxy * vec4(0.75, 0.75, -0.75, -0.75);
+
+ FragColor = textureLod(source, vec3(uvs + ofs.xy, layer), 0.0);
+ FragColor += textureLod(source, vec3(uvs + ofs.xw, layer), 0.0);
+ FragColor += textureLod(source, vec3(uvs + ofs.zy, layer), 0.0);
+ FragColor += textureLod(source, vec3(uvs + ofs.zw, layer), 0.0);
+ FragColor *= 0.25;
+
+ /* Clamped brightness. */
+ float luma = max(1e-8, brightness(FragColor.rgb));
+ FragColor *= 1.0 - max(0.0, luma - fireflyFactor) / luma;
#endif
}