Since Lee is swamped out with performance fixes and TGC are a small company,I don't want to be making this a request for yet more features, more seen as an opportunity for the community to help out with this development.
Every little helps and even though we don't know the engine or have access to the source we could still help in our own way.
To get to the nub of this..I am feeling the lack of waterfalls, explosions and all that lovely eye candy that makes your game pop. This of course will come but there is no harm in us as users experimenting a little outside the box in looking at way's of implementing these.
I am talking shaders here and though I am no coder it doesn't take long to get the idea of how these work when you dig into the code.Bond1 wrote the shader system for Reloaded and he really knows his stuff. The shaders in Reloaded are set up to be tweaked and many functions are already in place to be switched on/un-commented and used. The basic_fx shaders are designed for future use, simply tweaked and renamed for their own requirements.
I have been looking at modeling some waterfalls for Reloaded which would be dropped right into the editor as a single prop. The mesh base with steep rocks etc are no problem and the dropping water cascade is simply done using a scrolling texture shader to move the water texture across the surface (bond went a little further with the metro pack and scrolled the normal map). So I set about trying to add this simpler shader into the mix.
First things first, I do own DarkShader and although there is a patch to make it work with Reloaded shaders it simply doesn't work for me. The model always appears black and even if I fill all the texture slots it still returns the 'not enough textures error' so I have no visual on what I am doing. All the same I can still compile and see where any errors in the shader code might be
On first viewing you will find this in the The Main Vertex Shader:
//modify uv co-ordinates using the time value OUT.uv = IN.uv + float2(directionX,directionY)*time
Looks like the place to start, so I un commented this and of course on compile it will return an error, it's not going to be this simple.
In the Data Structs you have slightly different naming:
struct appdata
{
float2 UV : TEXCOORD0;
struct vertexOutput
{
float2 TexCoord : TEXCOORD0;
Seems caps are important too so it changed to this:
OUT.TexCoord = IN.UV + float2(directionX,directionY)*time;
We now need a float to send values to this function so looking at the default scroller in DarkShader we have a couple of values for direction, with the added bonus of a slider control
float directionX
<
string UIWidget = "slider";
float UIMax = 3.0;
float UIMin = -3.0;
float UIStep = 0.01;
> = 1.0f;
float directionY
<
string UIWidget = "slider";
float UIMax = 3.0;
float UIMin = -3.0;
float UIStep = 0.01;
> = 1.0f;
Wasn't sure where to add this so put it in 'Standard Constants'.
The shader now compiles without error, all the same in my research both in Darkshader and online I have found this line accompanies the subscript:
OUT.Position = mul( IN.Position, WorldViewProjection );
OUT.TexCoord = IN.UV + float2(directionX,directionY)*time;
So I included it even though I haven't the slightest clue what I am doing
The shader still compiled without error, but I don't have any idea if the texture is scrolling or not as Darkshader wont give me a visual in the preview window, I can only try it in Reloaded itself.....saved out as scroller_basic.fx
Of course it doesn't work and I get this error at start up:
So it looks like Reloaded won't recognize these values just yet or it's that I simply messed up
I don't want to annoy Lee with e-mails about this at this stage but know he visits these forums more regularly now so maybe can give some advice when he has a spare moment. I would mostly like input from the community themselves who may have an idea why I can't get Darkshader working for Reloaded shaders or perhaps an alternative way of viewing these. Particularly input from the coders around here and those who like to tweak and mess around with shader code.
If I can get this working I would move onto explosions,falling debris, caustics etc and create accompanying media, using Atlas walk which is a huge improvement on the old decals. I know a demo of explosions was shown before but not heard much of this since so it may be time wasting but still these shaders can be utilised in many,many ways and a benefit to us all.
Sorry for the long blown out post, it would have been simpler just to post the shader, but not sure it would get me in trouble to release that
Lee-"...and before you know it you're a shader coder!"
rolfy-"Coding...To me this is the Dark Arts..don't blame me when something Evil comes to claim y'all if I dabble in it"