Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

User projects written in or related to FreeBASIC.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by D.J.Peters »

dafhi wrote:abstract_terrain crash
@dafhi thank you for testing but more precision please !
compiletime or runtime or any error message with source line ?
DamageX wrote:Ah, so is it 32-bit address size then ?
May be the width of the GPU addressbus !

I wonder me the crapy intel GPU from dafhi and your newer GT640 as my GT240
both reports:
getLocalMemSize : 0 KB !
my:
getLocalMemSize : 16 KB

and why is your version:
OpenCL 1.1 CUDA 4.2.1 !
my:
OpenCL 1.1 CUDA 6.5.51

Do you use an old microsoft GeForce windows 10 driver or the latest NVIDEA driver ?

Joshy
dafhi
Posts: 1640
Joined: Jun 04, 2005 9:51

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by dafhi »

RunTime. tried fbc 1.05 and 1.07.1 .. i tried also new laptop win10 intel Iris
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by D.J.Peters »

@dafhi only this one shader makes trouble all other works so far ?

Joshy
dafhi
Posts: 1640
Joined: Jun 04, 2005 9:51

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by dafhi »

yep. i realize i could bug-hunt the glsl. might take a while ;)

[update] - n2D()

exhibit A

Code: Select all

  vec4 _fract = fract
    ( sin
      ( vec4(0, 1, 113, 114) + dot( i, vec2(1, 113) ) ) * 43758.5453
    );
exhibit B

Code: Select all

  ' when i remove mat2(_fract) *
  ' there is no more error
  return dot
    ( mat2(_fract) * vec2(1. - p.y, p.y),
      vec2(1. - p.x, p.x)
    );
Last edited by dafhi on Jan 07, 2020 13:26, edited 4 times in total.
DamageX
Posts: 130
Joined: Nov 21, 2009 8:42

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by DamageX »

Windows 2000 is limited to old driver versions such as 310.70
hurtado
Posts: 47
Joined: Apr 26, 2017 8:57
Contact:

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by hurtado »

Ah, shaders demos are sexy, I did some time ago a stand alone version executable of the sea scape, in 24kb
JohnK_RQ
Posts: 27
Joined: Nov 25, 2019 1:50

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by JohnK_RQ »

Thanks for this code, it is excellent 3d rendering.
Is it possible to get a fb.gfx_null window to work?
I am using Win10.

I say this because I just want the gl context and pixels. That is, just the bitmap and not the screen generated by ScreenRes.
I can get the bitmap from glReadPixels.
Using wglMakeCurrent causes an error loading the glproc functions

I can share my code but it is long
Thanks
JohnK_RQ
Posts: 27
Joined: Nov 25, 2019 1:50

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by JohnK_RQ »

I guess you can't use gfx.null with ScreenRes if you want an openGL context. Anyway here is my code in rapidQ with free basic DLL. It makes it easy to use the code posted in shaderToy. You can add textures, make Avi movies, use the mouse and offsets, and even modify and then execute glsl code. Just have to deal with two taskbar icons.

Windows source code and precomputed binaries are included.
http://rapidq.phatcode.net/openGL/GLSL_Demo.zip

Enjoy
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by UEZ »

JohnK_RQ wrote:I guess you can't use gfx.null with ScreenRes if you want an openGL context. Anyway here is my code in rapidQ with free basic DLL. It makes it easy to use the code posted in shaderToy. You can add textures, make Avi movies, use the mouse and offsets, and even modify and then execute glsl code. Just have to deal with two taskbar icons.

Windows source code and precomputed binaries are included.
http://rapidq.phatcode.net/openGL/GLSL_Demo.zip

Enjoy
Nice, thanks for sharing!

Can you add a FPS counter?
JohnK_RQ
Posts: 27
Joined: Nov 25, 2019 1:50

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by JohnK_RQ »

Updated code to show a FPS counter in the status bar. Get it from the same place.
http://rapidq.phatcode.net/openGL/GLSL_Demo.zip

fröhlich weihnachten
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by UEZ »

JohnK_RQ wrote:Updated code to show a FPS counter in the status bar. Get it from the same place.
http://rapidq.phatcode.net/openGL/GLSL_Demo.zip

fröhlich weihnachten
Thank you very much.

Auch dir fröhliche Weihnachten. :-)
Luxan
Posts: 222
Joined: Feb 18, 2009 12:47
Location: New Zealand

Re: Shaders from shadertoy.com on old OpenGL 2.x gfx cards.

Post by Luxan »

At the OpenGL for FreeBasic thread, I've posted some files that you may
find useful when using shadertoy .

I have a somewhat general question, how might I call from c a function
defined in FreeBasic .
Post Reply