Armory3d shader errors

#1

Hey there! I played around with shaders in armory. It’s really funny but many times I get error’s. I try to learn myself glsl ( here is an example: https://www.lighthouse3d.com/tutorials/glsl-tutorial/color-example/)
I even take some shader codes from the armory files and rewrite it to learn it but I always get this error:

Compiling shader 1 of 2 (MyMaterial.frag.glsl) failed:
Shader compiler error.
(node:8480) UnhandledPromiseRejectionWarning: Shader compiler error.
(node:8480) 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:8480) [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.
Build failed, check console

I would be happy if someone can help me!!
Have a wonderful day :wink:

0 Likes

#2

I am having the same problem. Here is my error Read prefs: C:\Users\o-liver\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
found bundled python: C:\Armory_06_win64\Armory\2.80\python
Loading MHX2 importer-runtime v 0.30
Loading MHX2 armature
build loaded
MHX2 armature loaded
shaders.py
MHX2 successfully (re)loaded
Loading maketarget v 2.0.0
pose.py reloaded
Warning: class MH_OT_export_obj contains a properties which should be an annotation!
C:\Armory_06_win64\Armory\2.80\scripts\addons\maketarget_init_.py:297
make annotation: MH_OT_export_obj.filter_glob
make annotation: MH_OT_export_obj.filepath
make annotation: MH_OT_export_obj.groupsAsMaterials
Warning: class MH_OT_batch_render contains a properties which should be an annotation!
C:\Armory_06_win64\Armory\2.80\scripts\addons\maketarget_init_.py:297
make annotation: MH_OT_batch_render.opengl
Warning: class MH_OT_load_target contains a properties which should be an annotation!
C:\Armory_06_win64\Armory\2.80\scripts\addons\maketarget_init_.py:297
make annotation: MH_OT_load_target.filter_glob
make annotation: MH_OT_load_target.filepath
Warning: class MH_OT_saveas_target contains a properties which should be an annotation!
C:\Armory_06_win64\Armory\2.80\scripts\addons\maketarget_init_.py:297
make annotation: MH_OT_saveas_target.filter_glob
make annotation: MH_OT_saveas_target.filepath
Warning: class MH_OT_symmetrize_target contains a properties which should be an annotation!
C:\Armory_06_win64\Armory\2.80\scripts\addons\maketarget_init_.py:297
make annotation: MH_OT_symmetrize_target.action
Loading MakeWalk
MakeWalk loaded
Armory: Proxy objects synchronized
Opening MHX2 file b’C:\Users\o-liver\Desktop\ManNumber1.mhx2’
Creating CYCLES material Mannumber1:Body:Old_caucasian_male
Unable to load “C:\Users\o-liver\Desktop\textures/old_lightskinned_male_diffuse.png”
Creating CYCLES material Mannumber1:Short01:Mhair01black
Unable to load “C:\Users\o-liver\Desktop\textures/short01_diffuse.png”
Creating CYCLES material Mannumber1:Low-poly:Eye_brown
Creating CYCLES material Mannumber1:Male_casualsuit03:Male_casualsuit03
Unable to load “C:\Users\o-liver\Desktop\textures/male_casualsuit03_diffuse.png”
Unable to load “C:\Users\o-liver\Desktop\textures/male_casualsuit03_normal.png”
BUILD Mannumber1:Body 1 1 <Vector (0.0000, 0.0000, 8.1831)>
BUILD Mannumber1:Short01 1 1 <Vector (0.0000, 0.0000, 8.1831)>
BUILD Mannumber1:Low-poly 1 1 <Vector (0.0000, 0.0000, 8.1831)>
BUILD Mannumber1:Male_casualsuit03 1 1 <Vector (0.0000, 0.0000, 8.1831)>
File C:\Users\o-liver\Desktop\ManNumber1.mhx2 loaded in 0.702985 s
Info: Deleted 1 object(s)

Info: Total files 2 | Changed 2 | Failed 0

Armory v0.6 ($Id: 988482e02afefe458b00e4dea75db2d01b76e49d $)
OS: win, Target: krom, GAPI: direct3d11, Blender: 2.80 (sub 44)
Exporting Scene
Armory Warning: Object Mannumber1 - No action assigned, setting to pose
Exporting armature action armorypose
Exporting mesh Mannumber1:Body
Exporting mesh Mannumber1:Low-poly
Exporting mesh Mannumber1:Male_casualsuit03
Exporting mesh Mannumber1:Short01
Scene exported in 1.6156585216522217
Exported modules: [‘audio’]
Shader flags: [’_Irr’, ‘_EnvCol’, ‘_Deferred’, ‘_ShadowMap’, ‘_CSM’, ‘_Legacy’, ‘_SinglePoint’, ‘_SMAA’, ‘_SSAO’, ‘_Deferred’, ‘_ShadowMap’, ‘_CSM’, ‘_Legacy’, ‘_SinglePoint’, ‘_SMAA’, ‘_SSAO’]
Running: [‘C:/Armory_06_win64/Armory/armsdk//nodejs/node.exe’, ‘C:/Armory_06_win64/Armory/armsdk//Kha/make’, ‘krom’, ‘-g’, ‘direct3d11’, ‘–shaderversion’, ‘110’, ‘–parallelAssetConversion’, ‘4’, ‘–to’, ‘build_Testformhx2blend/debug’, ‘–nohaxe’, ‘–noproject’]
Using project from C:\Users\o-liver\Desktop
Using Kha from C:\Armory_06_win64\Armory\armsdk\Kha
Creating Kha project.
Exporting asset 1 of 7 (Scene.arm).
Exporting asset 2 of 7 (World_irradiance.arm).
Exporting asset 3 of 7 (action_Mannumber1_armorypose.arm).
Exporting asset 4 of 7 (mesh_Mannumber1_Body.arm).
Exporting asset 5 of 7 (mesh_Mannumber1_Low-poly.arm).
Exporting asset 6 of 7 (mesh_Mannumber1_Male_casualsuit03.arm).
Exporting asset 7 of 7 (mesh_Mannumber1_Short01.arm).
Exporting asset 1 of 5 (Mannumber1_Body_Old_caucasian_male_data.arm).
Exporting asset 2 of 5 (Mannumber1_Low_poly_Eye_brown_data.arm).
Exporting asset 3 of 5 (Mannumber1_Male_casualsuit03_Male_casualsuit03_data.arm).
Exporting asset 4 of 5 (Mannumber1_Short01_Mhair01black_data.arm).
Exporting asset 5 of 5 (shader_datas.arm).
Exporting asset 1 of 1 (brdf.png).
Exporting asset 1 of 1 (smaa_area.png).
Exporting asset 1 of 1 (smaa_search.png).
Exporting asset 1 of 1 (brown_eye.png).
Compiling shader 1 of 35 (Mannumber1_Body_Old_caucasian_male_mesh.frag.glsl).
Compiling shader 2 of 35 (Mannumber1_Body_Old_caucasian_male_mesh.vert.glsl).
Compiling shader 3 of 35 (Mannumber1_Body_Old_caucasian_male_shadowmap.frag.glsl).
Compiling shader 4 of 35 (Mannumber1_Body_Old_caucasian_male_shadowmap.vert.glsl).
Compiling shader 5 of 35 (Mannumber1_Body_Old_caucasian_male_translucent.frag.glsl).
Compiling shader 6 of 35 (Mannumber1_Body_Old_caucasian_male_translucent.vert.glsl).
C:\Users\o-liver\Desktop\build_Testformhx2blend\debug\temp\Mannumber1_Body_Old_caucasian_male_shadowmap.frag.hlsl(28,19-76): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\Users\o-liver\Desktop\build_Testformhx2blend\debug\temp\Mannumber1_Body_Old_caucasian_male_shadowmap.frag.hlsl(35,11-25): error X4000: variable ‘dotNV’ used without having been completely initialized

Compiling shader 3 of 35 (Mannumber1_Body_Old_caucasian_male_shadowmap.frag.glsl) failed:
Shader compiler error.
(node:19036) UnhandledPromiseRejectionWarning: Shader compiler error.
(node:19036) 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:19036) [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.
Build failed, check console

0 Likes

#3

Hmm, I don’t know anything about writing shaders, but it looks like there is something in your shader files that Krafix, the shader cross-compiler, doesn’t like.

Armory will compile glsl shaders to other shader languages depending on the platform that you are targeting, and that is what is failing.

1 Like

#4

I really don’t know but I think there is something wrong with the custom shaders!! I have experience with the old glsl version. I used this to create my own shaders in the blender game engine and it was very funny :grin: ! But now I can’t switch to armory3d shaders because it has the new glsl version attached. I have to learn the openGl version, it is a bit different but I don’t know from where to learn this stuff. I really really hope that @lubos can fix this somehow.

0 Likes