armory3d / armsdk

Single-clone Armory SDK
38 stars 30 forks source link

Armory won't play with code #38

Closed TechComet closed 2 years ago

TechComet commented 3 years ago

Hi,

it's work if I play from blender ( blender -> armory player -> play )

but not work from code ( I use code-insiders ) it's get this problem

Compiling shader 1 of 20 (Material_mesh.frag.glsl).
Error compiling to GLSL 110: Unsigned integers are not supported on legacy targets.

Compiling shader 1 of 20 (Material_mesh.frag.glsl) failed:
Shader compiler error.
The terminal process "bash '-c', 'node /home/techcomet/Sdks/armsdk/Kha/make.js krom --debug'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Note: Legacy Shaders is disabled

Kubuntu 20.04

MoritzBrueckner commented 3 years ago

Hi, this should be fixed if you enable the Legacy Shaders option but that's probably not what you want. I guess it's because on Linux the shader version is set to 110 by default (if no --shaderversion parameter is passed to Khamake): https://github.com/Kode/krafix/issues/50. If you build from Blender, that parameter is passed (source) but it doesn't happen when you run the game from VSCode.

So I think this is rather an issue for https://github.com/Kode/vscode-kha, maybe there are some ways to configure the VSCode Kha extension so that it also adds --shaderversion 330, I don't know. The code seems like it's currently hard coded though...

TechComet commented 3 years ago

I try enable Legacy Shaders Same problem

kode studio fix this problem?

MoritzBrueckner commented 3 years ago

Even if you clean the build?

kode studio fix this problem?

Probably not as Kode Studio wasn't updated in a long time. VSCode currently is the recommended editor. I think we should open an issue on the https://github.com/Kode/vscode-kha repository for adding support for choosing the shader version from within VSCode (and preferably other options as well).

luboslenco commented 2 years ago

I think Legacy Shaders option is all we can do from the armory side. As the time goes maybe Robert will be open to bump default shader version from 110 to 330 on Linux.