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

Normal maps don't affect ReflectionProbes in GLES2 #43873

Closed
Firepal opened this issue Nov 26, 2020 · 3 comments
Closed

Normal maps don't affect ReflectionProbes in GLES2 #43873

Firepal opened this issue Nov 26, 2020 · 3 comments

Comments

@Firepal
Copy link

Firepal commented Nov 26, 2020

Godot version:
3.2.3

OS/device including version:
Windows 10 RTX2060

Issue description:
Using a SpatialMaterial with a normal map doesn't perturb a ReflectionProbe reflection,
but it does perturb a WorldEnvironment background reflection.
(The quad on the left is reflecting a checkerboard quad out of view)
image

AFAIK this behavior is undocumented, so I assume it's not a shader optimization?

Steps to reproduce:

  1. Create any mesh with a SpatialMaterial and give it a normal map
  2. Place a ReflectionProbe into the scene
  3. Move that mesh into the ReflectionProbe

The mesh will use the mesh's unperturbed normals for sampling the ReflectionProbe.

Minimal reproduction project:
normalMapReflection.zip

@clayjohn
Copy link
Member

My guess is that this will be fixed by changing this line (and the equivalent for reflection probes 2) to "normal" instead of "normal_interp"

normal_interp, vertex_interp, refprobe1_local_matrix,

Normal is the normal with normalmaps applied. While normal_interp comes straight from the vertex function.

@Firepal
Copy link
Author

Firepal commented Nov 26, 2020

@clayjohn What a very educated guess! :)

@akien-mga akien-mga added this to the 3.2 milestone Nov 26, 2020
@akien-mga
Copy link
Member

Fixed by #43885.

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

4 participants