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

FastNoiseLite for NoiseTexture3D always returns zero #95382

Closed
Makaque opened this issue Aug 11, 2024 · 4 comments
Closed

FastNoiseLite for NoiseTexture3D always returns zero #95382

Makaque opened this issue Aug 11, 2024 · 4 comments

Comments

@Makaque
Copy link

Makaque commented Aug 11, 2024

Tested versions

v4.2.2.stable.official [15073af]

System information

Godot v4.2.2.stable - Windows 10.0.19045 - GLES3 (Compatibility) - ANGLE (AMD, AMD Radeon (TM) R9 M360 (0x0000682B) Direct3D11 vs_5_0 ps_5_0, D3D11-27.20.1034.6) () - Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 Threads)

Issue description

I set up a mesh with a ShaderMaterial. The shader takes a sampler3D, to which I'm feeding a Simplex Smooth noise texture generated with the built-in FastNoiseLite.

For a simple test I have this

vec4 tex = texture(landmass_texture, VERTEX);
VERTEX += (NORMAL * tex.xyz);

But it's always zero. No error is ever thrown, but it's always zero. 2D textures work, but 3D doesn't.

Steps to reproduce

  • Start project
  • add CSGMesh3D root node
  • In the inspector, add a new ShereMesh and a new ShaderMaterial
  • In the Material properties, add a new Spatial Shader
  • Write the shader
shader_type spatial;
uniform sampler3D noise_texture;

void vertex() {
	vec4 tex = texture(noise_texture, VERTEX);
	VERTEX += (NORMAL * tex.xyz);
}
  • In the inspector, in Shader Parameters create a new NoiseTexture3D
  • In the NoiseTexture3D properties, for noise, create a new FastNoiseLite
  • There should be visible changes to the mesh, but NORMAL * tex.xyz is always zero.

Minimal reproduction project (MRP)

Noise3D.zip

@AThousandShips
Copy link
Member

Please explain what the issue is, what is expected and what are your results?

For me (in 4.3 [88f3b5f]) it renders with a noisy lumpy shape, with a 3D noise texture

@Grublady
Copy link
Contributor

Also unable to reproduce on 4.3-rc3; it renders in a noisy 3D shape.

@Makaque
Copy link
Author

Makaque commented Aug 11, 2024

I see the default sphere, unchanged, with a 1 unit diameter.
This problem seems to only appear in version 4.2.2 and only when Compatibility is chosen for the renderer. Fixed in 4.3-rc3.

@AThousandShips
Copy link
Member

AThousandShips commented Aug 11, 2024

Would need to identify what fixed it in 4.3 to consider for cherry picking for a future 4.2.x, otherwise this can be closed as it's fixed

Edit: this was an enhancement in 4.3:

Closing as this was an enhancement and will likely not be cherry picked

Thank you for reporting

@AThousandShips AThousandShips added this to the 4.2 milestone Aug 11, 2024
@AThousandShips AThousandShips closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2024
@AThousandShips AThousandShips removed this from the 4.2 milestone Aug 11, 2024
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