public void update() { float luz = calculateLight() + 0.1f; time += ElapsedTime; if (time < 0) { time = 0; } mainEffect.SetValue("time", time); mainEffect.SetValue("luz", luz); grassEffect.SetValue("time", time); grassEffect.SetValue("luz", luz); grassEffect.SetValue("wind", TgcParserUtils.vector2ToFloat2Array(MyWorld.Wind)); treeEffect.SetValue("time", time); treeEffect.SetValue("luz", luz); treeEffect.SetValue("wind", TgcParserUtils.vector2ToFloat2Array(MyWorld.Wind)); foreach (TgcMesh mesh in MyWorld.SkyBox.Faces) { mesh.Effect.SetValue("time", (float)time); mesh.Effect.SetValue("luz", luz); } }