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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-02-26 18:49:06 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-03-01 11:04:07 +0300
commit71ed6f32d2e3964f27204e3b9c6823fa61d7f8e4 (patch)
treeb54cab497f9c430aee50d09ff8a15a13155abae2 /source/blender/gpu
parentbfc70a6a958b9c35bde765ea8a02e8b1fd36db8b (diff)
Fix T84658: Anisotropic BSDF - most modes not using Screen Space
Reflection Anisotropic is not really supported in Eevee, but since code looks like it is just intended to make it behave like glossy, it should function like it too. Seems like the internal calling from `node_bsdf_glossy` from `node_bsdf_anisotropic` has swapped arguments. Also: ssr_id is available for SH_NODE_BSDF_ANISOTROPIC as well (see `ntree_tag_bsdf_cb`), so why not use it? Maniphest Tasks: T84658 Differential Revision: https://developer.blender.org/D10547
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl
index 8131958313b..ec49cc86761 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl
@@ -5,12 +5,13 @@ void node_bsdf_anisotropic(vec4 color,
float rotation,
vec3 N,
vec3 T,
- float use_multiscatter,
+ const float use_multiscatter,
+ const float ssr_id,
out Closure result)
{
- node_bsdf_glossy(color, roughness, N, -1, use_multiscatter, result);
+ node_bsdf_glossy(color, roughness, N, use_multiscatter, ssr_id, result);
}
#else
/* Stub anisotropic because it is not compatible with volumetrics. */
-# define node_bsdf_anisotropic(a, b, c, d, e, f, g, result) (result = CLOSURE_DEFAULT)
+# define node_bsdf_anisotropic(a, b, c, d, e, f, g, h, result) (result = CLOSURE_DEFAULT)
#endif