Comments (12)
#extension GL_ARB_shader_texture_lod : require
is the correct solution. You want it to error out if it's unsupported. This is a strange bug, it turns out every vendors implementation is technically wrong, other than MESA. They are simply too lax with the spec.
from supermodel.
The code is correct. The issue is the driver is missing functions that are part of the spec.
from supermodel.
Found out that adding #extension GL_ARB_shader_texture_lod : require
to the fragment shader and not changing anything else seems to make it work again on my system, but yeah I probably didn't consider it just being a strange driver issue as much as I should have. Strange.
from supermodel.
Is this something we should add to the source code? Or, will it have a potentially adverse affect on systems where texture2DLod exists by replacing it with a function that behaves slightly different?
from supermodel.
The extension's spec page has the following snippet, which makes me imagine it's at least intended to be functionally identical to machines where it compiles without the extension specified:
The existing isotropic vertex texture functions:
texture1DLod, texture1DProjLod,
texture2DLod, texture2DProjLod,
texture3DLod, texture3DProjLod,
textureCubeLod,
shadow1DLod, shadow1DProjLod,
shadow2DLod, shadow2DProjLod,
are added to the built-in functions for fragment shaders.
The spec also states it's written for GLSL 1.1 and OpenGL 2.0, and other references to this issue on the net seem to imply that GLSL 1.0-1.1 aren't supposed to support this function in fragment shaders without an extension; I don't know how different GLSL 1.2 (which the shader that causes this issue specifies its version as) is any different in regards to this quirk though.
It might better suffice to change require
to enable
in the extension declaration I posted earlier so that the extension isn't absolutely necessary to compile the shader, since evidently other setups don't have an issue with how things are now.
That being said, the biggest thing for me is that I haven't tested on anything else so I don't know for certain if this change would cause oddities with other machines because of OpenGL Implementation Magic individual graphics drivers seem to possess.
from supermodel.
You should really file a bug report with whomever wrote the gl driver. The version is set to #120 which means a compliant driver should support it since it's part of the core spec. The function got altered and renamed slightly for gl3+ to become just texturelod if I recall. That is the version used by the quad shader. The quad shader needs gl 4.5 but the triangle version is designed to run on the minimum possible gl version.
from supermodel.
I'm a bit late to the party. Discussing this same issue on the forums for the last couple of days: https://www.supermodel3.com/Forum/viewtopic.php?f=5&t=2231&start=20
Anyways. Looking at the specs for glsl 1.20 these functions can't be used in a fragment shader, but only in vertex shaders. The extension on the other hand allows the functions to be used in fragment shaders as well.
I found that mesa doesn't seem to allow to use extensions unless they are declared in the code or you use the force_glsl_extensions_warn=true
environment variable at runtime.
Adding #extension GL_ARB_shader_texture_lod : require
solves the problem but I will check later today if just using enable
is enough and report back.
from supermodel.
After testing I can also confirm that it’s enough to set the extension to ‘enable’ instead of ‘require’.
from supermodel.
Thanks a lot for your help and patience the last few days @dukeeeey.
I can create a PR to address this one if you want, just let me know.
from supermodel.
I think a PR would be nice. Feels like this comes up frequently for people.
from supermodel.
I think a PR would be nice. Feels like this comes up frequently for people.
PR created.
Thanks!
from supermodel.
fixed already
from supermodel.
Related Issues (20)
- Raspberry Pi 5: GLSL 4.10 is not supported. HOT 3
- Lag in Emergency Call Ambulance HOT 26
- Request: GroovyMISTER output path HOT 5
- Daytona 2 PE Scene transitions HOT 2
- Black/Blue Flashes HOT 10
- Supermodel crashes on startup when using wayland HOT 6
- validate roms HOT 3
- "make" system not robust for different Windows and MacOS Compilation HOT 5
- Cannot run any roms on 0.3a, [Error] Could not open '<rom>.zip'. No issue with 0.2a. HOT 5
- GAMES.XML HOT 4
- [vf3tb] Dural stage BGM disappears in the middle of the game
- Legacy renderer segfault on macOS HOT 1
- An old ancient mistake HOT 8
- Request: Appimage binary HOT 1
- Increase configurability for `~/.config` and `~/.local` paths
- Enable scuddxo commit has broken some 1.5 step games? HOT 1
- scuddxo glitches HOT 1
- [Linux][lamachin] Black screen when launching L.A. Machineguns HOT 10
- [Linux] Graphical problem choosing fullscreen option HOT 2
- [Linux][lostwsga] Aiming problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supermodel.