Open tripodsan opened 3 years ago
@tripodsan Can you reproduce this after disabling batching for both the project and editor in the Project Settings?
@tripodsan Can you reproduce this after disabling batching for both the project and editor in the Project Settings?
yeah. same behaviour.
2D meshes don't have per-vertex normals. Adding them should be a feature proposal.
We should probably add a note in array mesh, and surface tool.
Godot version: 3.2.4.RC4
OS/device including version: macOS BigSur, GLES2 / GLES3
Issue description: The normals (
Mesh.ARRAY_NORMAL
) are not passed to the canvas shader when using a mesh in 2d.Steps to reproduce:
MeshInstance2D
void fragment() { NORMAL = normalize(UV.x < 0.5 ? vec3(-1, 0, 1) : vec3(1, 0, 1)); COLOR = vec4(0.5, 0.5, 0.5, 1.0); }
Inspector
No Normals
https://user-images.githubusercontent.com/917628/111858429-4d413080-897c-11eb-9bbf-527ef64668ee.mp4
With normals via shader
https://user-images.githubusercontent.com/917628/111858546-423ad000-897d-11eb-8e31-6d7a9d4b4be8.mp4
Use color as normals
https://user-images.githubusercontent.com/917628/111858641-dc9b1380-897d-11eb-95be-9cd546245241.mp4
script
Minimal reproduction project: https://github.com/tripodsan/mesh-test