FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
310 stars 29 forks source link

gl_FragColor error on Blender 3.1.0 #125

Closed finn7199 closed 1 year ago

finn7199 commented 2 years ago

Hi, I get this error when I try to apply colors onto the shaders (step 2b). I don't understand what it means by: _glFragColor is removed after version 420

Blender Version 3.1.0 KKBP 5.1.0 CATS 0.19.0 HFPatch 3.14

ERROR (gpu.shader): pyGPUShader FragShader:
      |
   81 |         gl_FragColor = vec4(newColor.rgb, texRGBA.a);
      |
      | Error: C7616: global variable gl_FragColor is removed after version 420

Python: Traceback (most recent call last):
  File "C:\Users\shami\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 727, in execute
    convert_main_textures(lut_light)
  File "C:\Users\shami\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 479, in convert_main_textures
    image_to_KK(image, lut_light)
  File "C:\Users\shami\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 90, in image_to_KK
    shader = gpu.types.GPUShader(vertex_default, current_code)
Exception: Shader Compile Error, see console for more details

location: <unknown location>:-1
matchapuff commented 2 years ago

I have the same problem.

igugf commented 2 years ago

Same Error

TheLazyName commented 2 years ago

Are you trying to export a male model?

finn7199 commented 2 years ago

Are you trying to export a male model?

It's a female model. I just tried exporting a male model and I get the same error on step 2b. I tried using an older shader pack also (version 4.2.0 and 4.1.2), since the error said "gl_FragColor is removed after version 420".

WeepyWillow commented 2 years ago

I am also running into this same error, everything prior to that flows just fine but I get to step 2b and its just a wall I've hit and yet to be able to get working.

MediaMoots commented 2 years ago

Does it error on Blender 3.0?

TheLazyName commented 2 years ago

I did a test on Blender 3.0 and it seems to get passed that step. I'm assuming it's a 3.1 thing then.

WeepyWillow commented 2 years ago

I also just finished a 3.0 Test same results as LazyName it passed that step fine.

TheLazyName commented 2 years ago

Tested on 3.0 with a male model, it passed the step!

finn7199 commented 2 years ago

I tested on Blender 3.0 and it is working fine. Thank you so much!

MediaMoots commented 2 years ago

PR #138