April 24, 2019, 11:47:11 PM

Author Topic: One of the best shaders on ShaderToy.com  (Read 2434 times)

Offline col

  • Sr. Member
  • ****
  • Posts: 415
Re: One of the best shaders on ShaderToy.com
« Reply #15 on: August 24, 2018, 04:15:56 PM »
Quote
Made a cursory glance at the code and it appears to use geo shaders.
Can you show me where? :P

It's just 1 x OpenGL vertex and pixel shader version 1.2 - very low requirement :)
Any bugs in my code are proof of its hand-coded nature.
https://github.com/davecamp

Offline LT

  • Jr. Member
  • **
  • Posts: 28
Re: One of the best shaders on ShaderToy.com
« Reply #16 on: August 24, 2018, 09:29:07 PM »
It's just 1 x OpenGL vertex and pixel shader version 1.2 - very low requirement :)
Well then, I don't know why it doesn't work for me.

EDIT: Coincidentally, I just received back a notice from Avast that the .exe file is clean and I can now run it.  Same result, though, I get an error message saying it can't create the vertex shader.  Strange!

EDIT 2: The other examples work fine, but they're using DX because I'm testing on a Win32 machine.

Offline LT

  • Jr. Member
  • **
  • Posts: 28
Re: One of the best shaders on ShaderToy.com
« Reply #17 on: August 24, 2018, 10:41:18 PM »
Found the problem.  In three places, the use of ...

glGetProgramiv(_Id, GL_INFO_LOG_LENGTH, Varptr infoLength)
or
glGetShaderiv(Id, GL_INFO_LOG_LENGTH, Varptr infoLength)

... results in infoLength = 1 because it's returning the NULL character, even though it compiled fine.

Instead of ...

If infoLength > 0

You should probably only call glGet* if the compile status right above it is GL_FALSE.

So anyway, it's working fine for me now and looks cool.  :)

Offline col

  • Sr. Member
  • ****
  • Posts: 415
Re: One of the best shaders on ShaderToy.com
« Reply #18 on: August 24, 2018, 11:03:35 PM »
Good catch! Nice one! Thanks.

I'm glad it's working for you now.
Don't you just love those OpenGL drivers. It's almost as though it has something to say but then decides... naaah.

I've tweaked that bug in the repo to still allow warnings/errors only when more than one character is output.
Thanks again for looking in to it at your end  8)
Any bugs in my code are proof of its hand-coded nature.
https://github.com/davecamp

Offline Henri

  • Full Member
  • ***
  • Posts: 187
Re: One of the best shaders on ShaderToy.com
« Reply #19 on: August 25, 2018, 08:52:46 AM »
Nicely done ocean, very realistic. And good feedback from LT.

@Avast
My trust in Avast practices isn't that great after I learned that they acquired CCleaner (program I've used a lot) and turned it to something shady https://betanews.com/2018/06/28/avast-ruining-ccleaner/

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 105
Re: One of the best shaders on ShaderToy.com
« Reply #20 on: January 04, 2019, 06:00:06 PM »
Hiya,

After giving some advice for takis76 whos trying his/her best to get into shaders I recommended going to ShaderToy.com for some inspiration. While there I saw the most famous and most gorgeous SeaScape by Alexander Alekseev. And I thought.... yeah why not port it to BMax :)

This has got to be one of the most beautiful shaders I've seen so far  :)

And here it is running under.... BBC Basic! (I never thought I'd see this, me being of little faith...)





BasicBoy.
--

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1719
Re: One of the best shaders on ShaderToy.com
« Reply #21 on: January 04, 2019, 06:23:36 PM »
That looks great  :D
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).