Hello. I have problem witm my custom shader. I create custom shader to manipulate Vertexes invertex stage, like this:
shader ManipulateShader : ShaderBase, Transformation, Texturing, PositionStream4
{
stage float Time;
stage float SizeK;
//vertex shader
stage override void VSMain()
{
float4 pos = streams.Position;
float4 delta = float4(0,0,0.1f*sin(Time*3.0f+pos.z/2.0f)*(1.0f-streams.TexCoord.y)*SizeK + 0.01f*cos(Time*4.53f)*cos(Time*7.53f)*(1.0f-streams.TexCoord.y)*SizeK,0);
streams.ShadingPosition = mul(pos + delta, WorldViewProjection);
}
//pixel shader
stage override void PSMain()
{
streams.ColorTarget = Texture0.Sample(LinearRepeatSampler, streams.TexCoord);
}
};
And it’s working fine. But now i need that meshes which i appling this shader, also be able to receive shadows (i.e ShadowReciever), but i cannot find any documentation what kind of shader i need inherit to compute shadow properly. Anyone can help or have idea how it can be done?
I use Xenko 3.0.0.9