[SOLVED] Shader assetmanager question

hi, what i did was just copy JME PBR lighting shader(j3md, frag, vert)

i had issues to make it work, because there were errors, first one about “PBR_ComputeDirectLight”. But then i copied all glsllibs to local MatDefs, and it started work.

when i just try use Common folder glsllibs i had errors like:

compile error in: ShaderSource[name=MatDefs/OverlayPBR/overlayPBR.frag, defines, type=Fragment, language=GLSL150]
Fragment shader failed to compile with the following errors:
ERROR: 0:644: error(#202) No matching overloaded function found: PBR_ComputeDirectLight
ERROR: error(#273) 1 compilation errors. No code generated

Could not fully load Shader: Missing File: Common/ShaderLib/MorphAnim.glsllib

when i replace:

#import “Common/ShaderLib/MorphAnim.glsllib”

with copied:

#import “MatDefs/ShaderLib/MorphAnim.glsllib”

then it work properly.

below throw this issue
#import “MatDefs/ShaderLib/GLSLCompat.glsllib”
#import “MatDefs/ShaderLib/Instancing.glsllib”
#import “MatDefs/ShaderLib/Skinning.glsllib”
#import “Common/ShaderLib/MorphAnim.glsllib”


below work properly
#import “MatDefs/ShaderLib/GLSLCompat.glsllib”
#import “MatDefs/ShaderLib/Instancing.glsllib”
#import “MatDefs/ShaderLib/Skinning.glsllib”
#import “MatDefs/ShaderLib/MorphAnim.glsllib”

(all files are the same, just copied from JME Master)

would like to use Common, but any glsllib is not visible for some reason from there.

i think in earlier versions like 3.2.2 or 3.2.1 there were no issues like this(because i had overriden PBR lighting shader before and it was working without copy glsllib into local MatDefs).

might do something wrong(maybe gradle make some problems), but as i see this ShaderLib should be in:

and i got it in dependency folder properly.

but assetmanager for shader just cant find it in Common folder.

is this maybe some issue in JME?

ah, just needed a little break to know why. i just think its IDE related, because IDE is 3.2.2 and instead of using 3.3 Common libs, it use 3.2.2 Common libs where ofc there are no Morph and are many changes.

Using project shader files IDE read them properly, but Common is taken from IDE, not project. thats most probably the reason i have errors. Last time i were using 3.2.2 IDE and 3.2.2 code so Shader throw no errors related to Common libs.

Anyway trick is just to copy this libs to project.

nevermind then :slight_smile:

1 Like