-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Updating Shader to version 4.0 #1683
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Perminder <permindersingh089@gmail.com>
This is still a work in progress PR |
Here are the build results |
Signed-off-by: Perminder <permindersingh089@gmail.com>
Here are the build results |
Signed-off-by: Perminder <permindersingh089@gmail.com>
Here are the build results |
Please check the following patch. I get a bunch of errors from the shaders on my Mac, because texture2D is renamed to texture: Nothing renders yet, but it also doesn't crash, which is a good start. 😄 |
Hmmm....good catch. I will fix it now. I thought |
Signed-off-by: Perminder <permindersingh089@gmail.com>
Here are the build results |
Any "deprecated" OpenGL code is not allowed in OpenGL Core Profile. So the trick is looking around for deprecated code. |
Everything else in the code looks fine to me. Is there anything else that appears deprecated maybe? |
@cryos - any ideas? In combination with OpenChemistry/avogadroapp#497 the shaders compile and link completely. But we don't see anything rendered in the widget. |
Shaders are finicky, it would be looking at runtime issues, quirks or errors in updating. I had something pretty close to this but yeah I wasn't getting things to render correctly over a year back. I think the I don't see any discussion of the handling of the fragment color in this PR or the commits. |
Thanks - @perminder-17 also got some feedback in the OpenGL community forum .. core profile requires VAO - vertex array objects: https://www.khronos.org/opengl/wiki/Tutorial2:_VAOs,_VBOs,_Vertex_and_Fragment_Shaders_(C_/_SDL) There seems to be some other bits that need modernization (e.g., |
Thankyou so much @cryos for your thoughts.
I'm really sorry if I'm not referring to the same thing, but what I feel is: We can associate fragment shader outputs with colour attachments using a layout directive,
Also, the same thing can happen in the CPU too by
But since we're using a single colour attachment (i.e. replacing gl_FragColor rather than gl_FragData), is it necessary to explicitly specify the attachment? as any output variable defaults to attachment zero? |
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.