Horde3D
http://horde3d.org/forums/

GLSL shader creation
http://horde3d.org/forums/viewtopic.php?f=2&t=402
Page 1 of 1

Author:  lachlanmcdowall [ 11.07.2008, 17:04 ]
Post subject:  GLSL shader creation

Which editor do you use for GLSL shader creation? I am looking to use one for the creation of shaders for our project and was looking at AMD RenderMonkey which features code highlighting and GLSL compiling, is there a better option that would allow me to input the various uniforms from Horde

Author:  swiftcoder [ 11.07.2008, 20:41 ]
Post subject:  Re: GLSL shader creation

I just use a text editor (TextWrangler in my case), and add a button to my Horde app which reloads all the resources - it seems to work, and replaces all the scripts with their new versions, and logs any errors or failures.

Author:  marciano [ 11.07.2008, 21:46 ]
Post subject:  Re: GLSL shader creation

I'm using a text editor (Notepad++) and the Horde Editor for previewing with hot shader reloading (very useful :) ). This always worked very well for me and it would even be quite easy to enable syntax highlighting for Notepad++ with a custom GLSL syntax file.

Author:  jimbo [ 12.07.2008, 08:49 ]
Post subject:  Re: GLSL shader creation

Shader Designer by Typhoon Labs and MeshLab.

Author:  jimbo [ 12.07.2008, 14:23 ]
Post subject:  Re: GLSL shader creation

swiftcoder wrote:
I just use a text editor (TextWrangler in my case), and add a button to my Horde app which reloads all the resources - it seems to work, and replaces all the scripts with their new versions, and logs any errors or failures.

How do you do that? There doesn't seem to be a way to loop over all resources and unload them?

Author:  stuckie [ 13.07.2008, 17:33 ]
Post subject:  Re: GLSL shader creation

When we change levels in-game, we do Horde3D::clear(); which empties the scene graph - and all resources - then we reload the common ones ( and throw up a splash screen while we're doing so ) with whatever we'll need for the next level.

You could quite easily do something similar :)
Just remember that it literally wipes out all resources - including the pipeline res - which caught me out at first ;) hence the reason for a "load common resources" function.

Author:  Volker [ 13.07.2008, 18:37 ]
Post subject:  Re: GLSL shader creation

Why reloading the whole level? Why not only the files changed?

Author:  swiftcoder [ 13.07.2008, 22:10 ]
Post subject:  Re: GLSL shader creation

Volker wrote:
Why reloading the whole level? Why not only the files changed?
Because it doesn't actually seem to be specified anywhere what happens when you re-load an existing resource - so easier to clear and load everything. Do you know offhand what does happen if I attempt to load a resource when it is already loaded?

Author:  Volker [ 13.07.2008, 22:15 ]
Post subject:  Re: GLSL shader creation

I reload resources by calling Horde3D::unloadResource(resource); and Horde3DUtils::loadResourcesFromDisk(""); afterwards. If I remember correctly loading a resource that has been loaded already won't do anything.

Author:  stuckie [ 14.07.2008, 09:35 ]
Post subject:  Re: GLSL shader creation

The way we've got our engine setup sortof requires this, but it would probably be easy to change to unload just the previous levels resources rather than clearing everything.

Currently, the artists give us a COLLADA file with all the geometry and special attributes in it. I've messed with the converter somewhat to pick up on these extra attributes which then spits out Lua code to generate physics, light, camera, script and waypoint information from the file. It also creates "load" and "update" scripts which loads in all resources needed, and then updates anything which requires it over time.
I can get that to create an "unload" script easy enough, it's more the objects we create in game don't always have an easy way of catching them to unload, so thought the safest way to ensure everything's been cleared is just to nuke the entire scenegraph, and reload the common resources, before the next level.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/