Hi,
This was most certainly not to say there haven't been some great shader contributions made to the community. I definately wasn't trying to say that. I was refering to step-by-step tutorials that introduce people in to shader script.
Let's take a simple shader that that was contributed for example.
Code:
material mtl_vegetation
{
event=mtl_vegetation_init;
effect=
"
texture entSkin1;
dword mtlSkill1;
technique vegetation
{
pass p0
{
Texture[0]=<entSkin1>;
ZWriteEnable=True;
AlphaBlendEnable=False;
AlphaTestEnable=True;
AlphaRef=<mtlSkill1>;
AlphaFunc=Greater;
CullMode=CCW;
ColorArg1[0]=Texture;
ColorOp[0]=Modulate2X;
ColorArg2[0]=Diffuse;
}
}
technique fallback{pass p0{}}
";
}
We have the decalrations:
texture entSkin1;
What does texture mean and how do I use multiple skins?
dword mtlSkill1;
What does dword mean and how do I define multiple skills?
technique vegetation
What is a technique and how do I add multiple techniques into a shader?
pass p0
What is a pass and how do I do multiple passes?
Texture[0]=<entSkin1>;
ZWriteEnable=True;
AlphaBlendEnable=False;
AlphaTestEnable=True;
AlphaRef=<mtlSkill1>;
AlphaFunc=Greater;
CullMode=CCW;
What do all these shader commands mean and what are they doing in this code?
ColorArg1[0]=Texture;
ColorOp[0]=Modulate2X;
ColorArg2[0]=Diffuse;
What do these commands mean? What is Modulate2X and what is difusse and how do they effect the shader?
technique fallback{pass p0{}}
What is this line of code doing? Is this similar to a while(1)-wait(1) loop or is this a fallback of somekind for cards that can't handle this shader?
This is more the type of tutorials that are missing.
What is the structure for lets say a vertex shader output?
Code:
struct VS_OUTPUT
{
// declarations
};
VS_OUTPUT main_vs(parameters passed defined in declarations)
{
VS_OUTPUT Out ; // define the ouput
// Change output
return Out; // return output
}
Why exactly are we defining things like:
float4x4 matWorldViewProj;
float4x4 matWorld;
float4x4 matViewInv;
float3x3 WldToTan;
float4 vecViewPos;
float4 vecViewDir;
float4 vecLight;
float4 vecLightPos[8];
float4 vecLightColor[8];
and how to they reference to the objects in the 3DGS world? Such as the camera, the lights, etc. What is a matrix and how does it work?
What do the different matrices affect?
The world matrix - all objects in world space are transformed by this matrix
The view matrix - refers to the position of the camera
The projection matrix - defines how Direct3D projects the 3D scene onto the 2D surface
A tutorial let's say of making a vertex shader from scratch that does some small shader objective. How to define the variables, what do they mean. How to get the input, then change it, then output it and make it work with 3DGS.
I am sorry if I sounded like there has been no shader contributions, because that is not true, but step-by-step shaders covering differents shader types, vs, ps, hlsl, etc and what the commands inside these shaders actually mean and the structure of the shader script itself is what I was refering to.
Possibly it is just too complicated for anyone to explain, but I doubt it. I can look it the script and get a general idea of what is going on, but it would be nice to have some detailed tutorials on the subject. Anyway, I hope I didn't offend anyone too terribly.
And if there is a tutorial covering something like this for 3DGS, then I really put my foot in my mouth.
Loco