Skip to content

OpenGL: textureLod() is blocky due to using linear mipmaps instead of Gaussian #72823

@blitpxl

Description

@blitpxl

Godot version

v4.0.beta17.official [c400205]

System information

Windows 11, OpenGL (Compatibility), RTX 2060 (31.0.15.2824)

Issue description

I tried to make a blurred panel for a ui element with texturelod via shader:

shader_type canvas_item;

uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap_anisotropic;
uniform float blur_amount : hint_range(0.0, 5.0);

void fragment() {
	vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
	COLOR = blurred;
}

but what I got instead is this:
image

vulkan renderer does not exhibit this issue:
image

Steps to reproduce

  1. Add a TextureRect node
  2. Add a Panel node to overlay the previously added node
  3. Apply the blur shader to the panel node

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions