Gpencil stroke yellowish color shift caused by framebuffer attached with GPU_R11F_G11F_B10F texture. #94253

Open
opened 2021-12-19 16:49:04 +01:00 by Ghost · 6 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.09

Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: f1cca30557
Worked: (newest version of Blender that worked as expected)

gpencilColorBug.png

Short description of error
Yellowish color shift is caused by using framebuffer attached with GPU_R11F_G11F_B10F texture. Every single dots lost a little bit blue precision caused by texture type and make the whole stroke tints yellow after blending.

Fix method (Maybe?)
source\blender\draw\engines\gpencil\gpencil_engine.c::689 change texture format into GPU_RGBA16F. But there are still several places are using GPU_R11F_G11F_B10F. I don't know whether or not to we should change them.

Exact steps for others to reproduce the error
Open blender with default 2D animation settings. Change brush into airbrush and strength 0.1. Draw on canvas. colorbug.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.09 **Blender Version** Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: `f1cca30557` Worked: (newest version of Blender that worked as expected) ![gpencilColorBug.png](https://archive.blender.org/developer/F12763799/gpencilColorBug.png) **Short description of error** Yellowish color shift is caused by using framebuffer attached with `GPU_R11F_G11F_B10F` texture. Every single dots lost a little bit blue precision caused by texture type and make the whole stroke tints yellow after blending. **Fix method (Maybe?)** `source\blender\draw\engines\gpencil\gpencil_engine.c::689` change texture format into `GPU_RGBA16F`. But there are still several places are using `GPU_R11F_G11F_B10F`. I don't know whether or not to we should change them. **Exact steps for others to reproduce the error** Open blender with default 2D animation settings. Change brush into airbrush and strength 0.1. Draw on canvas. [colorbug.blend](https://archive.blender.org/developer/F12763766/colorbug.blend)

Added subscribers: @fclem, @antoniov

Added subscribers: @fclem, @antoniov

@fclem what do you think?

@fclem what do you think?

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

I can confirm the yellowish color, which is not seen in the render (with F12) because this one is apparently using GPU_RGBA16F and not GPU_R11F_G11F_B10F.

Maybe we could use GPU_RGB10_A2 to have a more balanced ratio between R, G and B channels and still keep the same memory size?

At first glance it doesn't seem ideal to have a different resolution for the blue channel.

I can confirm the yellowish color, which is not seen in the render (with F12) because this one is apparently using `GPU_RGBA16F` and not `GPU_R11F_G11F_B10F`. Maybe we could use `GPU_RGB10_A2` to have a more balanced ratio between R, G and B channels and still keep the same memory size? At first glance it doesn't seem ideal to have a different resolution for the blue channel.

IIRC, GPU_RGB10_A2 does not use the same blending capabilities as GPU_R11F_G11F_B10F which does the blending in unclamped floating points (first one blends in [0..1], the other [0..MAX_FLT]). But I'm not 100% sure about this.

And we now have shaded (lit) gpencils objects in the gpencil engines that needs correct unbounded linear space color blending before the tone-mapping step. This is why we keep GPU_R11F_G11F_B10F. using GPU_RGBA16F really slows down quickly on complex scene.

IIRC, `GPU_RGB10_A2` does not use the same blending capabilities as `GPU_R11F_G11F_B10F` which does the blending in unclamped floating points (first one blends in [0..1], the other [0..MAX_FLT]). But I'm not 100% sure about this. And we now have shaded (lit) gpencils objects in the gpencil engines that needs correct unbounded linear space color blending before the tone-mapping step. This is why we keep `GPU_R11F_G11F_B10F`. using `GPU_RGBA16F` really slows down quickly on complex scene.
Philipp Oeser removed the
Interest
Grease Pencil
label 2023-02-09 15:19:20 +01:00
Germano Cavalcante added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2023-05-05 22:47:16 +02:00
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#94253
No description provided.