Files
test2/source/blender/gpu/shaders/material/gpu_shader_material_emission.glsl
Jeroen Bakker 53ebe40ed2 Fix: EEVEE Compiler Issue Emission Shader
Due to recent changes the local variables where not explicitly cast, that failed
when compiling on Metal.

Pull Request: https://projects.blender.org/blender/blender/pulls/115463
2023-11-27 08:46:23 +01:00

16 lines
413 B
GLSL

/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
void node_emission(vec4 color, float strength, float weight, out Closure result)
{
color = max(color, vec4(0.0));
strength = max(strength, 0.0);
ClosureEmission emission_data;
emission_data.weight = weight;
emission_data.emission = color.rgb * strength;
result = closure_eval(emission_data);
}