mgsx-dev/gdx-gltf

Specular color texture is never passed to the PBR shader

dar-dev opened this issue · 2 comments

@dar-dev i think to issue is here :

.get(PBRTextureAttribute.Specular))).textureDescription);

it should use PBRTextureAttribute.SpecularColorTexture instead of PBRTextureAttribute.Specular.

Could you please test it with your models to confirm it works and send a PR?

Tested using "PBRTextureAttribute.SpecularColorTexture":

com.badlogic.gdx.utils.GdxRuntimeException: Shader compilation failed:
Fragment shader:
0(1254) : error C1503: undefined variable "u_specularColorSampler"

	at net.mgsx.gltf.scene3d.shaders.PBRShaderProvider.checkShaderCompilation(PBRShaderProvider.java:633)

The issue here's the "specularColorTextureFlag" is never defined in the PBRShader.

Please, check our fix here: MikOfClassX@fdb7570

I can send a PR if it looks good to you..

--