IT-Consultant: Charles Pegge > GLSL

BassBox SoundscapeGLSL plugin the 1st

(1/2) > >>

Charles Pegge:
This is my first attempt at using GLSL. Getting it operational has been quite an intricate process but once it is  set up, creating alternative landscapes with Shader programs is quite easy - tweaking the built-in variables.

The zip file below cpntains the most recent SoundscapeA and SoundscapeGLSL which is derived from it. There is also a folder called 'Shader' which contains the Shader program source: 'ShaderA.txt'. If there are any shader compile errors the shader will not be generated and the errors will be reported in 'shader_errors.txt', also within this fplder. 'shader_errors.txt' will not be deleted if the subsequent compiles are okay. Debugging is easy if you make alterations one at a time. If the shader fails to compile then the scene will be identical to SoundscapeA. If the scene looks weird or is not what you expected then you are at least error free as far as GLSL is concerned.

Shader compilation automatically takes place when the Plugin is started. To recompile the shader it is only necessary to select an adjacent plugin then reselect the SoundscapeGLSL plugin to restart it. The shader source code is very short so Notepad is fine for editing.

If your video system does not support all the functions required to implement the shader from Opengl then all the shader code will be bypassed and you will only see the SoundscapeA scene.

To install to Bassbox drop the files and the shader folder into the BassBox\BBPlugin folder as usual.

PS: Plugged a hole for systems not supporting GLSL (would cause a GPF!)

Kent Sarikaya:
Charles, great job, runs very smoothly even fullscreen!!

Charles Pegge:
I am glad it works well on your system Kent. I remember you have a card similar to my NVIDIA 7600. ATI cards should have no problems with it either but I doubt that most laptops will have shader language support, with their minmised GPU hardware.

Petr Schreiber:
Hi Charles,

fantastic! It runs at 66 FPS both in "fullscreen" and windowed mode.
I got just one warning:

--- Quote ---(18) : warning C7011: implicit cast from "int" to "float"

--- End quote ---

But it ran. Interesting "GLSL Validator" was quite angry on the fragment shader:

--- Quote ---ERROR: 0:17: '*' :  wrong operand types  no operation '*' exists that takes a left-hand operand of type '4-component vector of float' and a right operand of type 'const int' (or there is no acceptable conversion)

--- End quote ---

But as I said - driver had no problems with it :) I have GeForce 6150.


Patrice Terrier:

--- Quote ---I doubt that most laptops will have shader language support
--- End quote ---
It works perfectly well on my VISTA laptop, and without sound distortion even in full screen.

The only problem i found is the culling one, already reported, related to the depth of the shaded pyramide (see the enclosed screen shot).
Rather than using a pyramide i suggest the use of a gradiant ARGB texture drawn in the first plan. (I can do the ARGB texture for you if you want).



[0] Message Index

[#] Next page

Go to full version