One of the best shaders on ShaderToy.com

Started by col, August 23, 2018, 17:09:38

Previous topic - Next topic

col

QuoteMade 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 :)
https://github.com/davecamp

"When you observe the world through social media, you lose your faith in it."

LT

#16
Quote from: col on August 24, 2018, 16:15:56It'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.

LT

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.  :)

col

#18
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)
https://github.com/davecamp

"When you observe the world through social media, you lose your faith in it."

Henri

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

BasicBoy

Quote from: col on August 23, 2018, 17:09:38
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.
--

Steve Elliott

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb