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

OpenGL: TextureArrays and Texture3D samplers not implemented yet #71029

Closed
Tracked by #66458
jmdejong opened this issue Jan 7, 2023 · 3 comments · Fixed by #80363
Closed
Tracked by #66458

OpenGL: TextureArrays and Texture3D samplers not implemented yet #71029

jmdejong opened this issue Jan 7, 2023 · 3 comments · Fixed by #80363

Comments

@jmdejong
Copy link

jmdejong commented Jan 7, 2023

Godot version

Godot Engine v4.0.beta10

System information

archlinux; vulkan on dedicated NVIDIA GeForce RTX 3060 Laptop GPU; opengl3 on integrated AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.49, 6.1.1-arch1-1)

Issue description

With the opengl3 backend a shader will read a Samper2dArray uniform as being completely black.

opengl3:
texturearray_opengl3

vulkan:
texturearray_vulkan

used shader:

shader_type spatial;

uniform sampler2DArray textures : source_color, filter_linear_mipmap;

void fragment() {
	ALBEDO = texture(textures, vec3(UV, 1.0)).xyz;
}

Steps to reproduce

Create a scene with a meshinstance3d with the shader above as a material.
Give that shader a Texture2DArray as parameter.
With the vulkan renderer this will run fine, but with opengl3 the texture is read as being completely black.

Minimal reproduction project

sampler2darray.zip

@Chaosus Chaosus added this to the 4.0 milestone Jan 7, 2023
@clayjohn
Copy link
Member

Looks like this hasn't been implemented yet in the gl_compatibility nor have 3D textures. It should not be a lot of work to implement.

@clayjohn clayjohn modified the milestones: 4.0, 4.x Feb 23, 2023
@Calinou Calinou changed the title Sampler2dArray/Texture2DArray does not work with opengl3 backend OpenGL: TextureArrays and Texture3D samplers not implemented yet Mar 3, 2023
@Wolfe2x7
Copy link

Good news: as of Godot 4.1 RC1, TextureArrays are now functional in the OpenGL Compatibility renderer. 👍 Texture3Ds are still not implemented yet.

The cube should be a bright color, not black:

Image3

@alula
Copy link
Contributor

alula commented Aug 7, 2023

and here are Texture3Ds 👀

image

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

Successfully merging a pull request may close this issue.

7 participants