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

D3D12 TextureArray2D mipmaps missing/broken #98527

Open
Tracked by #95775
TokisanGames opened this issue Oct 25, 2024 · 2 comments
Open
Tracked by #95775

D3D12 TextureArray2D mipmaps missing/broken #98527

TokisanGames opened this issue Oct 25, 2024 · 2 comments

Comments

@TokisanGames
Copy link
Contributor

TokisanGames commented Oct 25, 2024

Tested versions

Reproducible in 4.3, 4.4dev3

System information

Windows 11/64, RTX 3070, D3D12

Issue description

In the Direct3D12 renderer, TextureArray2Ds don't seem to generate mipmaps so breaks Terrain3D and all other projects using them.

image

This code shows the next two images:

void fragment() {
    NORMAL = mat3(VIEW_MATRIX) * normalize(v_normal);
    // broken
    ALBEDO = texture(_texture_array_albedo, vec3(UV, 0.)).rgb;
    // works
    //ALBEDO = texture(test_albedo, UV).rgb;
}

image
image

Forcing mip 0 with vec2(0) derivatives also works.

Downstream issue TokisanGames/Terrain3D#529

Minimal reproduction project (MRP)

  • Create a new Godot project
  • Download Terrain3D from the asset library
  • Enable the plugin, open the demo, restart twice
  • Change to D3D12

If you wish to edit the shader, enable Terrain3D / Material / Shader Override.

@ArseniyMirniy
Copy link

This is definitely the case where the project would be very helpful to reproduce it

@TokisanGames
Copy link
Contributor Author

@ArseniyMirniy I added instructions that will take 2 minutes to create a test environment.

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

3 participants