Eevee mipmaps not respecting border mode #73942
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#73942
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.18362-SP0 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00
Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash:
77d23b0bd7
Also broken 2.83 alpha hash
f6d5a95513
Short description of error
Mipmaps used by Eevee appear to always be generated using tiling border mode, as if texture access mode is just set by modulo coordinates rather than setting the border sampling mode for the hardware.
This is true for both extend and clip modes of texture access.
I can't currently select Cycles rendering engine in 2.82 (presumably a different bug) but the problem doesn't exist in Cycles in 2.83 alpha or in previous versions where I've seen this bug (2.81 and 2.80 if I remember correctly), only in Eevee.
Exact steps for others to reproduce the error
Attached file demonstrates the bug. A plane with a magenta->black gradient texture is set to clip mode. You may need to zoom out to get a visible mipmap demonstrating the problem, as the mipmap chosen should depend on your own personal resolution.
mipclipbug.blend
Change to rendered view. At a suitable zoom, a magenta bar is visible on the rightmost margin of the plane.
Added subscriber: @vasiln
Since this could potentially be related to specific hardware, here's a screenshot:
Also shows up in renders:
Added subscriber: @iss
Changed status from 'Needs Triage' to: 'Confirmed'
Seems to happen only with linear interpolation in texture node.
Added subscriber: @JacquesLucke
I'm not sure why it behaves as it does, but it does look wrong. I can also confirm that it works as expected in Cycles.
2020-02-18 11-52-22.mp4
Extra info: problem exists regardless of linear, cubic, or smart filtering. No problem, of course, with closest (no mip) filtering.
Added subscriber: @fclem
The issue seems to be that
point_texco_clamp
assumes lod level 0 when querying the texture size. From what I've read, we can't simply clamp between 0 and 1, because textures are sampled at pixel centers. Unfortunately, I could not figure out how access the correct mip map level. Maybe @fclem knows that.This is tricky. We could use textureQueryLod for that matter but this is not supported on all target platform.
What I would prefer is to have different samplers objects for each textures and bind the correct one for each texture nodes.
That's too late for 2.83 so I would leave that open to be tackled for 2.90.
Added subscriber: @EnzioProbst
Another problem with mipmapping happens when using non-continuous texture coordinates like white noise.
I guess the automatic mip level calculation fails as dfdx and dfdy calculation does not make sense for this usage.
This only happens for Linear Interpolation.
Such a setup using white noise can be quite handy for raycasting shaders, blur effects etc.
It would be great to have an option for disabling mipmapping while still doing linear filtering. Would this be supported on all platforms?
Or even better expose a node socket for manually controlling the miplevel. Manual miplevel can also be used for number of effects like cheap blur.
while
textureQueryLod
is not OpenGL 3.3textureLod
is. So manual control should be doable.This issue was referenced by
b2dcff4c21
Changed status from 'Confirmed' to: 'Resolved'