forked from Psychtoolbox-3/Psychtoolbox-3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Procedural texture shaders: Remove corrective texture offsets.
Issue Psychtoolbox-3#800 suggests that it is no longer needed or helpful, but harmful. The offsets were applied in the past to correct for hardware texture sampling offsets of 0.5 texels. This was very neccessary 10+ years ago. What may have happened is that somebody at Khronos added a new texture sampling conformance test case to their OpenGL conformance test suite (CTS). Then a new version of the CTS was released to the gpu hardware vendors. They rerun the CTS against their drivers, found this conformance failure and fixed their OpenGL drivers, so that nowadays those texture sampling offsets no longer exist in modern driver + gpu combos. And this way our fix for texture sampling offsets turned into a bug that causes offsets on properly working drivers + gpu hardware. I've tested BasicGaborShader with the test code from issue Psychtoolbox-3#800 on multiple gpu's on Linux, Windows and macOS and could reproduce the problem, and the fix. Removing the sampling offset correction from BasicGaborShader.vert.txt fixed the shading on all current OS + gpu combos. The assumption is that the same issue and fix translate to all other procedural texture shaders, so the same fix is applied to all procedural shaders. Lets see if this holds up. Thanks to @qx1147 for propsing this fix. Heads up to @iandol for Opticka. Hopefully fixes Psychtoolbox-3#800.
- Loading branch information
Showing
8 changed files
with
8 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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