Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader Fix for M1 Silicon #571

Open
MBAnslow opened this issue Aug 21, 2023 · 1 comment
Open

Shader Fix for M1 Silicon #571

MBAnslow opened this issue Aug 21, 2023 · 1 comment

Comments

@MBAnslow
Copy link

Ursina is perfect for my use case and provides precisely the simple no-fuss 3d game engine that I need.

However... the shader doesn't work on an M1 mac. I get the error:

:display:gsg:glgsg(error): An error occurred while compiling GLSL vertex shader created-shader: ERROR: created-shader:2: '' : version '140' is not supported :display:gsg:glgsg(error): An error occurred while compiling GLSL fragment shader created-shader: ERROR: created-shader:2: '' : version '140' is not supported

I found out that Panda3d suggests changing the opengl version used with a one-liner:

loadPrcFileData("", "gl-version 3 2")

This works for Panda3d but doing this on Ursina I get:

:display:gsg:glgsg(error): An error occurred while compiling GLSL fragment shader created-shader: ERROR: created-shader:12: Invalid call of undeclared identifier 'texture2D' ERROR: created-shader:14: Use of undeclared identifier 'color' ERROR: created-shader:15: Use of undeclared identifier 'color'

I assume that this is related to the use of version 140 of glgsg but I have very little experience in this area.

I am right at the start of using game engines and have a very simple use case which Ursina fits perfectly. It'd be great to have a simple fix if that is possible rather than learning Panda3d.

@BurntRanch
Copy link

Can you send the whole output of your code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants