September 27, 2021, 14:46:37

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

Offline Krischan

  • Full Member
  • ***
  • Posts: 243
    • Krischan's Homepage
OpenB3D GLSL Sandbox Shader Demos
« on: October 26, 2017, 21:28:52 »
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 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).
« Last Edit: October 26, 2017, 21:31:31 by Krischan »
Kind regards

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

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2772
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: OpenB3D GLSL Sandbox Shader Demos
« Reply #1 on: October 27, 2017, 20:06:08 »
Some nice looking shaders :) - What sort of things did you have to do to adapt for OpenB3D?
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Mac mini (2020 ), M1 SoC, 8 GB LPDDR4, 512GB NVMe 
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time.

Offline peteswansen

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

Offline markcwm

  • Hero Member
  • *****
  • Posts: 502
Re: OpenB3D GLSL Sandbox Shader Demos
« Reply #3 on: October 27, 2017, 22:31:52 »

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, 23:19:09 »
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