diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-05-05 12:44:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-05-05 12:44:31 +0300 |
commit | 3505d948c65599cd58b441f66e57028569012e14 (patch) | |
tree | 6e415880a08328c5278adb0f43a74c98243456e7 /source/blender/draw | |
parent | adbe71c3fabab78985b1fa71a79fc2c03d73f939 (diff) |
DRW: Hair: Fix shader compilation of transform feedback shader
Introduced by rBadbe71c3faba.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_shader.c | 9 | ||||
-rw-r--r-- | source/blender/draw/intern/shaders/common_hair_refine_vert.glsl | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_shader.c b/source/blender/draw/intern/draw_shader.c index ffbae500e65..063aec24b94 100644 --- a/source/blender/draw/intern/draw_shader.c +++ b/source/blender/draw/intern/draw_shader.c @@ -43,8 +43,13 @@ static GPUShader *hair_refine_shader_transform_feedback_create( char *shader_src = BLI_string_joinN(datatoc_common_hair_lib_glsl, datatoc_common_hair_refine_vert_glsl); const char *var_names[1] = {"finalColor"}; - sh = DRW_shader_create_with_transform_feedback( - shader_src, NULL, "#define HAIR_PHASE_SUBDIV\n", GPU_SHADER_TFB_POINTS, var_names, 1); + sh = DRW_shader_create_with_transform_feedback(shader_src, + NULL, + "#define HAIR_PHASE_SUBDIV\n" + "#define USE_TF\n", + GPU_SHADER_TFB_POINTS, + var_names, + 1); MEM_freeN(shader_src); return sh; diff --git a/source/blender/draw/intern/shaders/common_hair_refine_vert.glsl b/source/blender/draw/intern/shaders/common_hair_refine_vert.glsl index a615dbd526b..6c784469e5b 100644 --- a/source/blender/draw/intern/shaders/common_hair_refine_vert.glsl +++ b/source/blender/draw/intern/shaders/common_hair_refine_vert.glsl @@ -1,5 +1,9 @@ #pragma BLENDER_REQUIRE(common_hair_lib.glsl) +#ifdef USE_TF +out vec4 finalColor; +#endif + void main(void) { float interp_time; |