armory3d / armory3d/armory

Build failing due to shader compile error "Unhandled promise rejection."

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

Description

```
Armory v2021.5 ($Id: 99497c80048d5b0614144ab4b87fb2303e416be2 $)
WARNING: Logic node tree and generated trait names differ! Node tree: "movement", trait: "Movement"
Armory: Using CPU for environment render (might be slow). Enable CUDA if possible.
Saved: 'C:\Users\Oliver\Desktop\Armory test 3.0.0\build_untitled\compiled\Assets\envmaps\env_orangecorridor.jpg'
Time: 00:00.21 (Saving: 00:00.02)

Exporting Scene
Scene exported in 0.012s

ERROR: C:\Users\Oliver\Desktop\Armory test 3.0.0\build_untitled\compiled\Shaders\std/light.glsl:151: 'LWVPSpot' : undeclared identifier
ERROR: C:\Users\Oliver\Desktop\Armory test 3.0.0\build_untitled\compiled\Shaders\std/light.glsl:151: 'LWVPSpot' : left of '[' is not of type array, matrix, or vector
ERROR: C:\Users\Oliver\Desktop\Armory test 3.0.0\build_untitled\compiled\Shaders\std/light.glsl:151: '=' : cannot convert from ' const float' to ' temp 4-component vector of float'
ERROR: C:\Users\Oliver\Desktop\Armory test 3.0.0\build_untitled\compiled\Shaders\deferred_light.frag.glsl:182: '' : compilation terminated
ERROR: 4 compilation errors. No code generated.

ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point

SPIR-V is not generated for failed compile or link

Compiling shader 8 of 23 (deferred_light.frag.glsl) failed:
Shader compiler error.
(node:16072) UnhandledPromiseRejectionWarning: Shader compiler error.
(node:16072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:16072) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Finished in 2.119s
WARNING: 1 warning occurred during compilation
ERROR: Build failed, check console
```

Ive played around quite a bit with the lights in the scene, seems there are some incompatability issues.

The blend file:
[untitled (2).zip](https://github.com/armory3d/armory/files/6473700/untitled.2.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the build with the attached untitled.2.zip Blender file, then inspect compiled/Shaders/std/light.glsl at line 151 and deferred_light.frag.glsl where compilation fails. Determine why LWVPSpot is undeclared for this scene and confirm that the shader compiles and the build completes without the reported promise rejection.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, cpp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.