Ooops
May 30, 2020, 03:42:21 AM

Author Topic: OpenB3D GLSL Sandbox Shader Demos  (Read 2027 times)

Offline Krischan

  • Full Member
  • ***
  • Posts: 211
    • Krischan's Homepage
OpenB3D GLSL Sandbox Shader Demos
« on: October 26, 2017, 09:28:52 PM »
This is something I've been working on the last months to get more familar with OpenB3D and shaders. I didn't wrote the shaders myself, they are a favourite selection I've made from the great website www.glslsandbox.com where you can run them in a browser. It wasn't too hard to migrate a shader to run with OpenB3D and I think we should use some of them as examples for OpenB3D - if there is no license problem, many should be CC or PD. Some of them are really breathtaking and I stopped after "only" 114 demo examples ;D But there are much, much more to explore on the website.

See attached ZIP for all of my favourite samples (not yet compiled as EXE to save a lot of space but they all run here with BlitzmaxOS and OpenB3D, didn't test them on NG yet but they should work too when you change the brl.timer lines to brl.timerdefault).
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2371
Re: OpenB3D GLSL Sandbox Shader Demos
« Reply #1 on: October 27, 2017, 08:06:08 PM »
Some nice looking shaders :) - What sort of things did you have to do to adapt for OpenB3D?
Until the next time...

Offline peteswansen

  • Jr. Member
  • **
  • Posts: 56
Re: OpenB3D GLSL Sandbox Shader Demos
« Reply #2 on: October 27, 2017, 08:57:54 PM »
Very nice..its great that the BRL followers have such talented programmers!!  (wish I was one...lol)

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 453
Re: OpenB3D GLSL Sandbox Shader Demos
« Reply #3 on: October 27, 2017, 10:31:52 PM »
Hi,

I adapted a sandbox shader to show how to apply one to a surface, I couldn't see any usefulness for the engine in the 2d shaders so I never added one. Some of your examples could be adapted to a useful purpose, like the sun could be applied to one side of a skybox or the lava to a pool mesh, but one big problem is many are too slow, in fact some of them crashed my laptop, the mushrooms and one of the water ones, and many were just blank, but the sandbox demos often crashed my browser too so I had decided there was no point, but if you'd like to pick out shaders that are useful and fast then I'll add them to the Openb3d shaders.

To apply to a surface you change "gl_FragCoord.xy to gl_TexCoord[n].st" and in the vert use "gl_Position = ftransform();" or later equivalent, and to set the uvs up in the vert "gl_TexCoord[n] = gl_MultiTexCoord0;" also you don't have to use the built-in gl_TexCoord[n] you can use a varying vec2.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: OpenB3D GLSL Sandbox Shader Demos
« Reply #4 on: October 28, 2017, 11:19:09 PM »
Cool demos Krischan! The atmospheric stuff are nice. I do like how OpenB3D works with post process shaders.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal