Fix shader#6
Open
giraldeau wants to merge 2 commits into
Open
Conversation
If the GL shader fails to load, terminate the children and report the error to the user. Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
usampler2DRect requires GL_EXT_gpu_shader4, see: https://www.opengl.org/wiki/GL_EXT_texture_integer However, it is not available on cheap Linux/Intel cards/drivers. When using sampler2DRect, the shader loads, but the window is completely dark. This fix is therefore incomplete. How can we make drawing work with sampler2DRect only? Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Owner
|
I don't think it's possible to use sampler2DRect as a replacement for usampler2DRect. The host has set up the texture using unsigned integer values, and any conversion to/from float would cause other parts of the shader program to fail - eg. this stuff: And look at MemViewWidget::paintGL() and myImage. Your other fix to add an error message when failing to load the program is probably a good idea. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
I'm trying to make the shader work on my modest machine, with a cheap Intel card. The driver does not supports the GL_EXT_gpu_shader4 extension, and therefore usampler2DRect is not available. I tried to revert to sampler2DRect, but the window is blank (see screenshot below). Can we make it work with simply sampler2DRect?
The first patch is about reporting to the user if the shader does not load.
Thanks!