Custom Unit/Feature Shaders rebasing on Engine Shaders

Custom Unit/Feature Shaders rebasing on Engine Shaders

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Custom Unit/Feature Shaders rebasing on Engine Shaders

Post by Beherith »

I noticed that my custom unit shaders code has started to diverge greatly from the engine's modelfragprog and modelvertprog.glsl
Engine shaders:
https://github.com/spring/spring/blob/d ... gProg.glsl
https://github.com/spring/spring/blob/d ... tProg.glsl
BAR shader:
http://imolarpg.dyndns.org/trac/balates ... efault.lua

Would it be recommended to rebase the customunitshaders on the newer engine shaders?

Also, could anyone who knows of an implementation of custom feature shaders link to one? I would very much like to play around with it.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Custom Unit/Feature Shaders rebasing on Engine Shaders

Post by Kloot »

The engine shaders are just a basic reference to how rendering was done in 2005 with MRT support tacked on, diverging from them is rather encouraged (especially for games that do any post-processing tricks). To move from deferred lighting to a full deferred shading Lua pipeline in 101 I'd start from scratch.

There are no Spring.FeatureRendering examples out yet, but hopefully (it's easy) people will clean up and generalize CustomUnitShaders into CustomObjectShaders soon.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10453
Joined: 24 Jan 2006, 21:12

Re: Custom Unit/Feature Shaders rebasing on Engine Shaders

Post by PicassoCT »

Custom Object Shaders? The unity approach?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Custom Unit/Feature Shaders rebasing on Engine Shaders

Post by gajop »

@Feature Shaders: I'm working on it, was just slacking a bit these days :P
It should appear here: https://github.com/gajop/Custom-Unit-Shader-Framework . I'll update this thread once it does.
For now I've added shader support for unit death animations (after UnitDestroyed and before RenderUnitDestroyed callins).
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Custom Unit/Feature Shaders rebasing on Engine Shaders

Post by gajop »

Thanks to some feedback from kloot, I managed to add the custom feature shader support to the framework, and also a README on how to try it out. Now waiting on jk to merge the PR.

I've noticed BA(R) uses a slightly different gadget (with deferred rendering shaders and other minor things). Do BAR devs think this should be merged upstream? Should be trivial and maybe make it easier to merge my latest changes.
Post Reply

Return to “Game Development”