diff options
Diffstat (limited to 'source/blender/draw/engines/gpencil/shaders')
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index 75bd3d30d68..6671c16aa0b 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -344,7 +344,7 @@ float stroke_thickness_modulate(float thickness) } else { /* World space point size. */ - thickness *= thicknessWorldScale * ProjectionMatrix[1][1] * sizeViewport.y; + thickness *= thicknessWorldScale * drw_view.winmat[1][1] * sizeViewport.y; } return thickness; } diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_depth_merge_vert.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_depth_merge_vert.glsl index e162c5bf45e..2fca8b69183 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_depth_merge_vert.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_depth_merge_vert.glsl @@ -5,5 +5,5 @@ void main() int v = gl_VertexID % 3; float x = -1.0 + float((v & 1) << 2); float y = -1.0 + float((v & 2) << 1); - gl_Position = ViewProjectionMatrix * (model_matrix * vec4(x, y, 0.0, 1.0)); + gl_Position = drw_view.persmat * (model_matrix * vec4(x, y, 0.0, 1.0)); } diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl index af8aec85598..b0ee059cb9d 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl @@ -32,7 +32,7 @@ void main() vec3 vert_N; gpMaterial gp_mat = materials[ma1.x + gpMaterialOffset]; - gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag); + gpMaterialFlag gp_flag = floatBitsToUint(gp_mat._flag); gl_Position = gpencil_vertex(ma, ma1, @@ -125,7 +125,7 @@ void main() gpencil_color_output(fill_col, fcol_decode, 1.0, gp_mat._fill_texture_mix); gp_interp.mat_flag = gp_flag & GP_FILL_FLAGS; - gp_interp.mat_flag |= uint(ma1.x) << GPENCIl_MATID_SHIFT; + gp_interp.mat_flag |= uint(ma1.x + gpMaterialOffset) << GPENCIl_MATID_SHIFT; gp_interp.uv = mat2(gp_mat.fill_uv_rot_scale.xy, gp_mat.fill_uv_rot_scale.zw) * uv1.xy + gp_mat._fill_uv_offset; diff --git a/source/blender/draw/engines/gpencil/shaders/infos/gpencil_info.hh b/source/blender/draw/engines/gpencil/shaders/infos/gpencil_info.hh index 3b4de704c00..1db98d13c4a 100644 --- a/source/blender/draw/engines/gpencil/shaders/infos/gpencil_info.hh +++ b/source/blender/draw/engines/gpencil/shaders/infos/gpencil_info.hh @@ -20,8 +20,8 @@ GPU_SHADER_INTERFACE_INFO(gpencil_geometry_iface, "gp_interp") GPU_SHADER_CREATE_INFO(gpencil_geometry) .do_static_compilation(true) + .define("GP_LIGHT") .typedef_source("gpencil_defines.h") - .typedef_source("gpencil_shader_shared.h") .sampler(0, ImageType::FLOAT_2D, "gpFillTexture") .sampler(1, ImageType::FLOAT_2D, "gpStrokeTexture") .sampler(2, ImageType::DEPTH_2D, "gpSceneDepthTexture") |