Closed youssefsahli closed 2 years ago
This is definitely something I haven't noticed. Could you try a couple things:
run
with #:shader #f
to turn off the shader. Is everything ok?% raco pkg remove r-cade # remove already installed version
% cd r-cade # cd into cloned repository folder
% raco pkg install # install using local, cloned copy
Running without the shader works. After cloning the repo, and installing it, I can see the same bug again, with the shader on.
I've been trying different things, but can't seem to get anything like this to repro. I don't have a Linux box to test on, sadly. The CRT shader is most definitely the culprit (see: https://github.com/massung/r-cade/blob/master/shader.rkt#L44). But, it would be difficult to debug w/o some help from you. Also, do you have a video card? If so, which one? The shader doesn't really do anything special, but maybe there's a odd function I'm using that's not working and I can work around it.
If you're willing to work with me a bit w/ the code, there are a few things you may consider trying to see what happens:
"gl_FragColor = vec4(texture2D(texture, gl_TexCoord[0].xy).rgb, 1.0);"
This should have the same effect as using #:shader #f
, but still actually use the shader. If that's still messed up, then the issue is more fundamental. If it looks fine, then at least that's a start.
"#version 110\n" ; NOTE the \n is needed!
You can see all available GLSL versions here: https://riptutorial.com/glsl. You may also try ES versions to see if they work for you. If you hit something that does the trick, let me know and I can update the repo.
#version
line, you can try forcing high precision floats and integers:"precision highp float;"
"precision highp int;"
If that has no effect, it's also possible high precision is supported on your system. I find that unlikely, but you can use mediump
instead. As a mental note, I can run it locally using lowp
precision and the shader still works fine.
I understand if you aren't willing to try these things out, but if you are, I thank you very much!
Edit: note that if you've cloned the repo and used raco pkg install
on the local copy, you don't need to uninstall/reinstall the package each change. You can just edit the shader.rkt file and re-run the programs.
Graphic Card: Intel Corporation Skylake GT2 [HD Graphics 520] [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile]
Changing the last line to gl_FragColor = vec4(texture2D(texture, gl_TexCoord[0].xy).rgb, 1.0);
looks fine, and the shader is ok.
Adding a version number:
version 110:
Uniform "resolution" not found in shader
Uniform "scale" not found in shader "
version 400:
Failed to compile fragment shader:
0:2(748): error: `gl_TexCoord' undeclared
0:2(748): error: type mismatch
0:2(748): error: operands to arithmetic operators must be numeric
0:2(1108): warning: `pixel' used uninitialized
0:2(1150): warning: `pixel' used uninitialized"
version 300 es:
Failed to compile fragment shader:
0:2(27): error: No precision specified in this scope for type `vec2'
0:2(51): error: No precision specified in this scope for type `float'
0:2(71): error: No precision specified in this scope for type `float'
0:2(95): error: No precision specified in this scope for type `float'
0:2(185): error: No precision specified in this scope for type `float'
0:2(177): error: No precision specified in this scope for type `float'
0:2(254): error: No precision specified in this scope for type `vec2'
0:2(251): error: No precision specified in this scope for type `vec2'
0:2(282): error: No precision specified in this scope for type `vec2'
0:2(367): error: No precision specified in this scope for type `vec2'
0:2(363): error: No precision specified in this scope for type `vec3'
0:2(457): error: No precision specified in this scope for type `float'
0:2(466): error: No precision specified in this scope for type `vec3'
0:2(448): error: No precision specified in this scope for type `vec4'
0:2(480): error: No precision specified i
- version 320 es: same as 300 es
- version 120 & 130: No error but broken as before.
- version 330 & 400 :
Failed to compile fragment shader:
0:2(748): error: gl_TexCoord' undeclared 0:2(748): error: type mismatch 0:2(748): error: operands to arithmetic operators must be numeric 0:2(1108): warning:
pixel' used uninitialized
0:2(1150): warning: `pixel' used uninitialized
* Notes:
- _(Precision qualifiers don't work with glsl versions prior to 130)_
- using mediump: nothing changes
- using lowp: same
Good news! Since 8.5 everything is back to normal.
Description: Since the 8.1 cs version, running any example gives broken visuals.
Screenshots:
|| || ||\ || || \ // CPU: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz || || ||\|| || )X( DESKTOP: GNOME \_// || || || // \ DEVICE: HP Notebook DISTRO: Fedora 34 (Workstation Edition) EDITOR: N/A (Could Not Read $Editor, Make Sure It Is Set) KERNEL: 5.11.20-300.fc34.x86_64 PKGS: DNF MEMORY: 3816MB SHELL: NU UPTIME: 4d 0h 9m