beatnik
Lofting is ridiculously quick, so be careful it can be addicting lol.
I'd like to call Scott out on this and ask any of you guys who have shown interest in this thread, Alex, Elwood, Markus, maybe even Luc or Scott, to have a look at what I have done and give me some feedback in areas I can improve on? I am kind of getting to the stage now where I'm not sure if it's finished, or if I have a lot more to doAnd there's the problem. As soon as people realize just how hard it is they get discouraged. What needs to happen really is that the experienced modders have to start taking these new folks under their wing, as it were. Find the ones that are really serious and perhaps start working on a track with them. They'll get valuable experience, and you'll actually have help getting stuff done. This is what makes some of the larger mod groups so strong really....
But really, this is why there never seem to be a lot of track builders--it's just a LOT of work and out of 100 people who think they can do it you may only find a handful that have the skill to do it, or the patience and commitment to LEARN the skill to do it....
Reverse sides for the fence, does that mean duplicated poly with flipped normals instead of just double sided in the shader settings?
ShaderName=L2DiffuseT0LerpT1xT2VertexAlpha
{
ShaderDesc="T1 lerp T2 mul T3 Vertex Alpha"
ShaderLongDesc="Diffuse lighting, tex1 lerp tex2 x tex3, lerp using vertex alpha, DX9."
ShaderDowngrade=L1DiffuseT0T1xT2
ShaderLevel=(2) // DX9
{
Pass=(0) // normal
{
VertexShader=vs20_blinnDiffuseT0T1T2
{
File=vs20_blinnDiffuse.vsh
Language=HLSL
Define=(NUMTEX, 3)
VertexDecl=PShadeDecl
ShaderConstants=(Default)
}
PixelShader=ps20_blinnDiffuseT0LerpT1xT2VertexAlpha
{
File=ps20_blinnDiffuse.psh
Language=HLSL
Define=(NUMTEX, 3)
Define=(LERPALPHA, 1)
Define=(MULTEX, 1)
ShaderConstants=Lighting
StageState=(0, DiffuseMap, Modulate)
StageState=(1, DiffuseMap, Add)
StageState=(2, DiffuseMap, Modulate)
SamplerState=(0, Wrap, Wrap, Wrap)
SamplerState=(1, Wrap, Wrap, Wrap)
SamplerState=(2, Wrap, Wrap, Wrap)
}
}
}
}
I took up the opportunity to see if I could figure this out. I took the shader [L2DiffuseT0LerpT1xT2T3VertexAlpha] and removed the T3 refrence. I copied VS20_BLINNDIFFUSE.VSH and PS20_BLINNDIFFUSE.PSH into the shared folder, and made a new gfx file (contents below)
What I edited was, in vertex shader, numtex from 4 to 3 and set VertexShader=vs20_blinnDiffuseT0T1T2Code:ShaderName=L2DiffuseT0LerpT1xT2VertexAlpha { ShaderDesc="T1 lerp T2 mul T3 Vertex Alpha" ShaderLongDesc="Diffuse lighting, tex1 lerp tex2 x tex3, lerp using vertex alpha, DX9." ShaderDowngrade=L1DiffuseT0T1xT2 ShaderLevel=(2) // DX9 { Pass=(0) // normal { VertexShader=vs20_blinnDiffuseT0T1T2 { File=vs20_blinnDiffuse.vsh Language=HLSL Define=(NUMTEX, 3) VertexDecl=PShadeDecl ShaderConstants=(Default) } PixelShader=ps20_blinnDiffuseT0LerpT1xT2VertexAlpha { File=ps20_blinnDiffuse.psh Language=HLSL Define=(NUMTEX, 3) Define=(LERPALPHA, 1) Define=(MULTEX, 1) ShaderConstants=Lighting StageState=(0, DiffuseMap, Modulate) StageState=(1, DiffuseMap, Add) StageState=(2, DiffuseMap, Modulate) SamplerState=(0, Wrap, Wrap, Wrap) SamplerState=(1, Wrap, Wrap, Wrap) SamplerState=(2, Wrap, Wrap, Wrap) } } } }
In Pixel shader I set numtex to 3, lerpalpha to 1 and multex to 1. Removed the 4th StageState and SamplerState and set PixelShader=ps20_blinnDiffuseT0LerpT1xT2VertexAlpha
It all comes up ok in 3dmax, but I get an error compiling shader when I go to fire it up in the scene viewer.
Is there some sort of compiler needed? or a simple text edit is all it needs and I have missed something out?
or have I completely gone down the wrong path altogether?
Cheers!
You can probably reuse an existing vertex shader, unless you need extra mapping co-ordinates. It's the pixel shader where you probably want to change things mostly.