Horde3D

Next-Generation Graphics Engine
It is currently 02.05.2025, 14:49

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: GLSL shader creation
PostPosted: 11.07.2008, 17:04 
Offline

Joined: 09.05.2008, 19:02
Posts: 18
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


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 11.07.2008, 20:41 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 11.07.2008, 21:46 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 12.07.2008, 08:49 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
Shader Designer by Typhoon Labs and MeshLab.


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 12.07.2008, 14:23 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 13.07.2008, 17:33 
Offline

Joined: 22.05.2008, 18:30
Posts: 37
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 13.07.2008, 18:37 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Why reloading the whole level? Why not only the files changed?


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 13.07.2008, 22:10 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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?

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 13.07.2008, 22:15 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: GLSL shader creation
PostPosted: 14.07.2008, 09:35 
Offline

Joined: 22.05.2008, 18:30
Posts: 37
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group