armory3d / armory3d/armory

Normal maps don't work with Forward rendering

Open
#2,866 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

### TL;TR

Normal maps don't work with Forward rendering.

### Node tree example

![image](https://user-images.githubusercontent.com/69180012/234748735-21ce638e-45d5-48ef-a02d-72524ee34703.png)

### 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:
Assignment attempts for the undefined `n` variable:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading blender/arm/make_world.py around the definition of n and blender/arm/material/cycles.py around lines 402-408, then reproduce the reported normal-map node tree with Forward rendering. Check the generated Material_mesh.frag.glsl for the undefined variable and confirm that the shader compiles and normal maps work when the issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.