So I am starting to realize that my texture shader requires an actual texture to sample…
I cannot find a way to shade a model that just comes textured.
Am I really supposed to load up each texture the model uses if I want shading? - I was hoping this color data was just baked into the model so to speak, and could be read by the shader…
Here is my draw code:
public override void Draw_3D(Layer layer)
{
worldMatrix = layer.my_camera.viewMatrix;
worldMatrix *= Matrix.CreateTranslation((my_pos.X) / 500, -(my_pos.Y) / 500, (-10000f + (10000f * layer.scale)) / 500f);
foreach (ModelMesh mesh in cube_model_tiny.Meshes)
{
foreach (Effect currentEffect in mesh.Effects)
{
currentEffect.CurrentTechnique = currentEffect.Techniques["Textured"]; //"Colored"
currentEffect.Parameters["xWorld"].SetValue(worldMatrix);
currentEffect.Parameters["xView"].SetValue(layer.my_camera.viewMatrix);
currentEffect.Parameters["xProjection"].SetValue(Camera.projectionMatrix);
currentEffect.Parameters["xEnableLighting"].SetValue(true);
currentEffect.Parameters["xLightDirection"].SetValue(layer._lightDirection);
currentEffect.Parameters["xAmbient"].SetValue(0.5f);
// currentEffect.Parameters["modcol"].SetValue(new Vector4(1, 1, 0, 1));
}
mesh.Draw();
}
}