3d-game-shaders-for-beginners
3d-game-shaders-for-beginners copied to clipboard
:display:gsg:glgsg(warning): Project runs but shaders do not load correctly
After building the project and copying the binary to /Developer/Panda3D/bin as suggested in this post - https://discourse.panda3d.org/t/panda3d-c-not-working-on-os-x-10-11/15456/2, I get the following errors:
:util(error): Unable to make directory /panda3d, caching disabled. Known pipe types: CocoaGraphicsPipe (all display modules loaded.) :display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-0.frag produced the following warnings: WARNING: Could not find vertex shader attribute 'vertex' to match BindAttributeLocation request. WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader WARNING: Output of vertex shader 'vertexColor' not read by fragment shader WARNING: Output of vertex shader 'diffuseCoord' not read by fragment shader WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.
:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-1.frag produced the following warnings: WARNING: Could not find vertex shader attribute 'vertex' to match BindAttributeLocation request. WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader WARNING: Output of vertex shader 'vertexColor' not read by fragment shader WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.
These are different warnings from the shader compile errors reported on macOS mojave 10.14.5 and I was wondering how to get round this?
The error message is just telling you that the cache directory could not be created, try setting the full path of model-cache-dir
to a desired writable directory in Config.prc. However, it should not affect the output (and neither should the warnings).
Unfortunately, it does affect the output. The project loads but I can only see a dark outline of the scene I assume because the shaders are not working.
I'm seeing the same warnings when I try to run (on macOs Catalina) and also seeing dark shapes in the render window, and to be fair I don't know if they're related.
Wondering if either of you have any other thoughts or found any workarounds. Changing the path of model-cache-dir
in the Config.prc
didn't seem to make a difference for me. Also, the default model-cache-dir
setting works fine for my python Panda3D programs.
^^ update: I didn't notice that there was a local .prc
file at /demonstration/panda3d-prc-file.prc
. Once I edited the value of model-cache-dir
there I stopped seeing the :util(error): Unable to make directory /panda3d, caching disabled.
error.
note: this did not fix the shader warnings, which appear similar to some of those discussed here https://discourse.panda3d.org/t/cant-get-simple-glsl-shaders-example-working/25548/3. although the fixes on that thread haven't worked out for me yet.
:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-0.frag produced the following warnings:
WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader
WARNING: Output of vertex shader 'vertexColor' not read by fragment shader
WARNING: Output of vertex shader 'diffuseCoord' not read by fragment shader
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.
:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-1.frag produced the following warnings:
WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader
WARNING: Output of vertex shader 'vertexColor' not read by fragment shader
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.
:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-2.frag produced the following warnings:
WARNING: Output of vertex shader 'normalCoord' not read by fragment shader
WARNING: Output of vertex shader 'vertexNormal' not read by fragment shader
WARNING: Output of vertex shader 'binormal' not read by fragment shader
WARNING: Output of vertex shader 'tangent' not read by fragment shader
WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.
^^ 2nd update: I now think that the issue we're both seeing is actually this, we just weren't articulating it well and got thrown off by the warnings. the fix merged for that issue also hasn't worked out for me, though.
- https://discourse.panda3d.org/t/what-happened-to-my-normal-maps/27237
- https://github.com/panda3d/panda3d/issues/1119

I also have this problems.
this is maybe a bug about M1 MacBook Pro?
in order to get some debug information, I add:
notify-level warning
notify-level-glgsg spam
default-directnotify-level warning
notify-output mygame-log.txt
and the log file is in the attach: mygame-log.txt .
I also have this problems. i'm use intel macbookpro
I also have this problems. i'm use intel macbookpro
Go to buy a PC, and forget this issue.
Amazing suggestions, very helpful.
Got this too