Different gpu line drawing in 3.5.0 #106459
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#106459
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.29
Blender Version
Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash:
1be25cfff18b
Worked: 3.4.1
Short description of error
Lines are drawn differently in 3d view:
gpu.state.blend_set("ALPHA")
POLYLINE_UNIFORM_COLOR
it does not display lines until the object is rotated or moved after first lunch of modal operator, unlikeUNIFORM_COLOR
or3D_UNIFORM_COLOR
.gpu.state.line_width_set(1)
to 10 forPOLYLINE_UNIFORM_COLOR
have no effect, unlikeUNIFORM_COLOR
or3D_UNIFORM_COLOR
.Probably solution
make
gpu.state.blend_set("ALPHA")
support forUNIFORM_COLOR
or for3D_UNIFORM_COLOR
(if it still used), it doesn't have that drawing problem except for anti-aliasing support.Exact steps for others to reproduce the error
P.S. sliding between images is not supported :(
POLYLINE_UNIFORM_COLOR
shader is using different method to draw lines and you can use uniformlineWidth
to set the line width.Yes, thanks, using
shader.uniform_float("lineWidth", 1)
solve an issue partially but it still some AA problem for vertical lines and not drawn at first run.Also look at this example with
shader.uniform_float("lineWidth", 20)
:vertical line drawn thinner than others (maybe this is an issue for AA in vertical lines).
POLYLINE_UNIFORM_COLOR.mp4
P.S. nice...video also not supported.
are you sure you setup viewportSize uniform for
POLYLINE_UNIFORM_COLOR
shader?what is the proper code for this?
shader.uniform_float("viewportSize", vec2)
what
vec2
should be?So complicated shader for only AA support... I suppose
vec2
is width x height of my current VIEW_3D or monitor resolution? In any case, this did not solve the issue with the thin vertical line.But I need to note that after
shader.uniform_float("viewportSize", (1920, 1080))
it start to draw lines at first run now.This could probably be closed as a duplicate of #103176
Does the example from blender/blender-manual#103176 (comment) help?
Ok, close it. I'll ask questions there.
Well, I would only close it if the "right" usage of the API does NOT cause a regression. Would still be good to know if this all works nicely as before (if the API is used correctly)
I tried example code from there
and it seems all fine, except it become more complicated to code.
P.S. you have some troubles with uploading files. Not always it generate link to
copy link
OK then, if it works correctly, then lets continue discussion in #103176 (will close as duplicate).
Havent stumbled upon this one directly, but something along the lines was reported in infrastructure/blender-projects-platform#12 (see my last comment about attachments missing, might be related, feel free to post there if this is somehow reproducable)