armory3d / armory

3D Engine with Blender Integration
https://armory3d.org
zlib License
3.05k stars 316 forks source link

Normal maps don't work with Forward rendering #2866

Open rpaladin opened 1 year ago

rpaladin commented 1 year ago

TL;TR

Normal maps don't work with Forward rendering.

Node tree example

image

Errors

ERROR: D:\Blender\Projects\RP\0_Build_Files\Mine\A3D\Mobile_Test\build_A3D_Mobile_Test\compiled\Shaders\Material_mesh.frag.glsl:24: 'n' : undeclared identifier
ERROR: D:\Blender\Projects\RP\0_Build_Files\Mine\A3D\Mobile_Test\build_A3D_Mobile_Test\compiled\Shaders\Material_mesh.frag.glsl:24: '' : compilation terminated
ERROR: 2 compilation errors.  No code generated.

Resources

Variable n defined here: https://github.com/armory3d/armory/blob/main/blender/arm/make_world.py#L121 Assignment attempts for the undefined n variable: https://github.com/armory3d/armory/blob/main/blender/arm/material/cycles.py#L402-L408

e2002e commented 1 month ago

This should have been fixed in the latest releases, can you try and close if yes ?