This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/material/gpu_shader_material_emission.glsl
Clément Foucault 1d51cb6be2 Cleanup: EEVEE: change cameraVec macro to cameraVec(P)
This makes is clearer and avoid having to setup worldPosition if
shader is not a material shader.
2021-02-21 01:33:56 +01:00

11 lines
322 B
GLSL

void node_emission(vec4 color, float strength, vec3 vN, out Closure result)
{
result = CLOSURE_DEFAULT;
#ifndef VOLUMETRICS
result.radiance = render_pass_emission_mask(color.rgb) * strength;
result.ssr_normal = normal_encode(vN, viewCameraVec(viewPosition));
#else
result.emission = color.rgb * strength;
#endif
}