Fix: GPU: Wrong attribute types for UNORM 8bit attributes
This was a mistake inside e57359726f.
Simply replacing SNORM_8 by UNORM_8 fixes the issue.
This commit is contained in:
@@ -134,7 +134,7 @@ gpu::VertBufPtr extract_sculpt_data_subdiv(const MeshRenderData &mr,
|
||||
|
||||
/* Then, gather face sets. */
|
||||
GPUVertFormat face_set_format = {0};
|
||||
GPU_vertformat_attr_add(&face_set_format, "msk", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
GPU_vertformat_attr_add(&face_set_format, "msk", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
|
||||
gpu::VertBuf *face_set_vbo = GPU_vertbuf_calloc();
|
||||
GPU_vertbuf_init_with_format(*face_set_vbo, face_set_format);
|
||||
|
||||
@@ -622,9 +622,9 @@ static void channel_list_draw_keys(ChannelDrawList *channel_list, View2D *v2d)
|
||||
sh_bindings.size_id = GPU_vertformat_attr_add(
|
||||
format, "size", blender::gpu::VertAttrType::SFLOAT_32);
|
||||
sh_bindings.color_id = GPU_vertformat_attr_add(
|
||||
format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.outline_color_id = GPU_vertformat_attr_add(
|
||||
format, "outlineColor", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "outlineColor", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.flags_id = GPU_vertformat_attr_add(
|
||||
format, "flags", blender::gpu::VertAttrType::UINT_32);
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ void ui_draw_but_TAB_outline(const rcti *rect,
|
||||
const uint pos = GPU_vertformat_attr_add(
|
||||
format, "pos", blender::gpu::VertAttrType::SFLOAT_32_32);
|
||||
const uint col = GPU_vertformat_attr_add(
|
||||
format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
/* add a 1px offset, looks nicer */
|
||||
const int minx = rect->xmin + U.pixelsize, maxx = rect->xmax - U.pixelsize;
|
||||
const int miny = rect->ymin + U.pixelsize, maxy = rect->ymax - U.pixelsize;
|
||||
|
||||
@@ -281,9 +281,9 @@ static void vicon_keytype_draw_wrapper(const float x,
|
||||
sh_bindings.size_id = GPU_vertformat_attr_add(
|
||||
format, "size", blender::gpu::VertAttrType::SFLOAT_32);
|
||||
sh_bindings.color_id = GPU_vertformat_attr_add(
|
||||
format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.outline_color_id = GPU_vertformat_attr_add(
|
||||
format, "outlineColor", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "outlineColor", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.flags_id = GPU_vertformat_attr_add(
|
||||
format, "flags", blender::gpu::VertAttrType::UINT_32);
|
||||
|
||||
|
||||
@@ -1196,7 +1196,7 @@ void UI_view2d_multi_grid_draw(
|
||||
GPUVertFormat *format = immVertexFormat();
|
||||
const uint pos = GPU_vertformat_attr_add(
|
||||
format, "pos", blender::gpu::VertAttrType::SFLOAT_32_32);
|
||||
uint color = GPU_vertformat_attr_add(format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
uint color = GPU_vertformat_attr_add(format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
|
||||
GPU_line_width(1.0f);
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
|
||||
uint color_id = GPU_vertformat_attr_add(
|
||||
format, "color", blender::gpu::VertAttrType::SFLOAT_32_32_32_32);
|
||||
uint outline_color_id = GPU_vertformat_attr_add(
|
||||
format, "outlineColor", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "outlineColor", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
uint flags_id = GPU_vertformat_attr_add(
|
||||
format, "flags", blender::gpu::VertAttrType::UINT_32);
|
||||
|
||||
|
||||
@@ -127,9 +127,9 @@ static void nla_action_draw_keyframes(
|
||||
sh_bindings.size_id = GPU_vertformat_attr_add(
|
||||
format, "size", blender::gpu::VertAttrType::SFLOAT_32);
|
||||
sh_bindings.color_id = GPU_vertformat_attr_add(
|
||||
format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.outline_color_id = GPU_vertformat_attr_add(
|
||||
format, "outlineColor", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "outlineColor", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.flags_id = GPU_vertformat_attr_add(
|
||||
format, "flags", blender::gpu::VertAttrType::UINT_32);
|
||||
|
||||
|
||||
@@ -428,9 +428,9 @@ void sequencer_retiming_keys_draw(const TimelineDrawContext *timeline_ctx,
|
||||
sh_bindings.size_id = GPU_vertformat_attr_add(
|
||||
format, "size", blender::gpu::VertAttrType::SFLOAT_32);
|
||||
sh_bindings.color_id = GPU_vertformat_attr_add(
|
||||
format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.outline_color_id = GPU_vertformat_attr_add(
|
||||
format, "outlineColor", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
format, "outlineColor", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
sh_bindings.flags_id = GPU_vertformat_attr_add(
|
||||
format, "flags", blender::gpu::VertAttrType::UINT_32);
|
||||
|
||||
|
||||
@@ -1144,7 +1144,7 @@ static void draw_ndof_guide_orbit_center(const RegionView3D *rv3d)
|
||||
|
||||
GPUVertFormat *format = immVertexFormat();
|
||||
uint pos = GPU_vertformat_attr_add(format, "pos", blender::gpu::VertAttrType::SFLOAT_32_32_32);
|
||||
uint col = GPU_vertformat_attr_add(format, "color", blender::gpu::VertAttrType::SNORM_8_8_8_8);
|
||||
uint col = GPU_vertformat_attr_add(format, "color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
|
||||
|
||||
immBindBuiltinProgram(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
|
||||
immUniform1f("size", 7.0f);
|
||||
|
||||
Reference in New Issue
Block a user