hey everybody. i'm from germany and my english is not the best ;) i like this tutorials and they are very helpful. so here my question:
i would like to add my effect to a certain mesh and not to every mesh of my model.
for example mesh number 10 should get the effect! i combined the reflection and the specular shader from the tutorials :)
now the code is:
public void Draw(Matrix view, Matrix projection, Vector3 cameraPosition)
{
// Go through each pass in the effect, but we know there is only one...
foreach (EffectPass pass in skyBoxEffect.CurrentTechnique.Passes)
{
// Draw all of the components of the mesh, but we know the cube really
// only has one mesh
foreach (ModelMesh mesh in skyBox.Meshes)
{
// Assign the appropriate values to each of the parameters
foreach (ModelMeshPart part in mesh.MeshParts)
{
part.Effect = skyBoxEffect;
part.Effect.Parameters["World"].SetValue(
Matrix.CreateScale(size) * Matrix.CreateTranslation(cameraPosition));
part.Effect.Parameters["View"].SetValue(view);
part.Effect.Parameters["Projection"].SetValue(projection);
part.Effect.Parameters["SkyBoxTexture"].SetValue(skyBoxTexture);
part.Effect.Parameters["CameraPosition"].SetValue(cameraPosition);
}
// Draw the mesh with the skybox effect
mesh.Draw();
}
}
}and another question is, how can i reduce the reflection of the reflection shader ?
thanks for help
greetz from germany :)

