Fix T97394: single points are brighter than stroke in 3D viewport
Convert 3D point shader fragment color from sRGB space to framebuffer space to match 3D line shader. Reviewed By: fclem Maniphest Tasks: T97394 Differential Revision: https://developer.blender.org/D16831
This commit is contained in:
parent
7d2dbe7849
commit
a7ad2dea62
Notes:
blender-bot
2023-02-14 10:54:29 +01:00
Referenced by issue #103426, Regression: Crash on Insert Keyframe Referenced by issue #97394, Annotations: single points are brighter than stroke in 3D viewport
|
@ -1,3 +1,4 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -11,7 +12,7 @@ void main()
|
|||
* ...
|
||||
* dist = 0 at center of point */
|
||||
|
||||
fragColor.rgb = color.rgb;
|
||||
fragColor = blender_srgb_to_framebuffer_space(color);
|
||||
fragColor.a = mix(color.a, 0.0, smoothstep(radii[1], radii[0], dist));
|
||||
|
||||
if (fragColor.a == 0.0) {
|
||||
|
|
|
@ -37,6 +37,7 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_point_uniform_size_uniform_color_aa)
|
|||
.push_constant(Type::FLOAT, "size")
|
||||
.vertex_source("gpu_shader_3D_point_uniform_size_aa_vert.glsl")
|
||||
.fragment_source("gpu_shader_point_uniform_color_aa_frag.glsl")
|
||||
.additional_info("gpu_srgb_to_framebuffer_space")
|
||||
.do_static_compilation(true);
|
||||
|
||||
GPU_SHADER_CREATE_INFO(gpu_shader_3D_point_uniform_size_uniform_color_aa_clipped)
|
||||
|
|
Loading…
Reference in New Issue