Welcome to mirror list, hosted at ThFree Co, Russian Federation.

eevee_film_resolve_frag.glsl « shaders « eevee « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b77649481edb4426364cd7dfe7ad6c69fb698da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#pragma BLENDER_REQUIRE(eevee_film_lib.glsl)

layout(std140) uniform film_block
{
  FilmData film;
};

uniform sampler2D data_tx;
uniform sampler2D weight_tx;
uniform sampler2D first_sample_tx;

in vec4 uvcoordsvar;

layout(location = 0) out vec4 out_color;

void main(void)
{
  vec2 uv = uvcoordsvar.xy;

  vec4 color = textureLod(data_tx, uv, 0.0);
  float weight = textureLod(weight_tx, uv, 0.0).r;

  out_color = film_data_decode(film, color, weight);

  vec4 first_sample = textureLod(first_sample_tx, uv, 0.0);
  out_color = mix(first_sample, out_color, film.opacity);
}