Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

texture(SCREEN_TEXTURE, SCREEN_UV) shader bug in 4.0 dev for Vulkan #55097

Closed
SheilaWarren opened this issue Nov 18, 2021 · 1 comment
Closed

Comments

@SheilaWarren
Copy link

Godot version

4.0dev

System information

Mac OSX 11.1

Issue description

Trying to grab the screen contents in a shader using texture or textureLod causes thousands of errors in the debugger. Using Vulkan 1.2.182.0 or 1.2.189.0 on MacOS X 11.1.

Repeating error list:

E 0:00:01:0292 texture_create: Height must be equal or greater than 1 for 2D and 3D textures
<C++ Error> Condition "p_format.height < 1" is true. Returning: RID()
<C++ Source> drivers/vulkan/rendering_device_vulkan.cpp:1756 @ texture_create()
E 0:00:01:0292 compute_list_bind_compute_pipeline: Condition "!pipeline" is true.
<C++ Source> drivers/vulkan/rendering_device_vulkan.cpp:7814 @ compute_list_bind_compute_pipeline()
E 0:00:01:0292 version_get_shader: Index p_variant = 0 is out of bounds (variant_defines.size() = 0).
<C++ Source> ./servers/rendering/renderer_rd/shader_rd.h:141 @ version_get_shader()
E 0:00:01:0292 uniform_set_create: Condition "!shader" is true. Returning: RID()
<C++ Source> drivers/vulkan/rendering_device_vulkan.cpp:5498 @ uniform_set_create()
E 0:00:01:0292 compute_list_bind_uniform_set: Condition "!uniform_set" is true.
<C++ Source> drivers/vulkan/rendering_device_vulkan.cpp:7887 @ compute_list_bind_uniform_set()
E 0:00:01:0292 version_get_shader: Index p_variant = 0 is out of bounds (variant_defines.size() = 0).
<C++ Source> ./servers/rendering/renderer_rd/shader_rd.h:141 @ version_get_shader()

...

repeats indefinitely.

Steps to reproduce

Add a ColorRect to the scene. Add canvas shader. set the COLOR = texture(SCREEN_TEXTURE, SCREEN_UV);

shader_type canvas_item;

void fragment() {
	COLOR = texture(SCREEN_TEXTURE, SCREEN_UV);
}

Minimal reproduction project

SCREEN_TEXTURE_Bug.zip

@Calinou
Copy link
Member

Calinou commented Nov 18, 2021

Duplicate of #50976.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants