Files
test/source/blender/gpu/shaders/material/gpu_shader_material_translucent.glsl
Clément Foucault ac11ccd2bd EEVEE-Next: Add Translucent BSDF support
This adds support for Translucent BSDF.

This also fixes a bug to allow correct
shadowing.

The input normal had to be set back to
non-inverted in the node function to allow
for correct interpretation of the Normal
by Screen Space Reflections.

This add the necessary optimization
and code deduplication to hybrid deferred
and forward pipeline.

Pull Request: https://projects.blender.org/blender/blender/pulls/116070
2023-12-13 02:19:19 +01:00

17 lines
432 B
GLSL

/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
void node_bsdf_translucent(vec4 color, vec3 N, float weight, out Closure result)
{
color = max(color, vec4(0.0));
N = safe_normalize(N);
ClosureTranslucent translucent_data;
translucent_data.weight = weight;
translucent_data.color = color.rgb;
translucent_data.N = N;
result = closure_eval(translucent_data);
}