public Game1() : base() { graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 800; camera = new Base3DCamera(this, .1f, 20000); floor = new BaseDeferredObject(this, "Models/plane"); floor.TextureMaterials.Add("Textures/FloorColor"); floor.NormalMaterials.Add("Textures/FloorNormal"); floor.Position = new Vector3(0, -1f, -10); Components.Add(floor); dude = new BaseDeferredSkinnedObject(this); dude.Position = new Vector3(0, -1, -10); dude.RotateAA(Vector3.Up, MathHelper.PiOver2); dude.Scale = Vector3.One * .05f; dude.AnimationClip = "Take 001"; dude.Mesh = "Models/dude"; Components.Add(dude); SunPosition = new Vector3(110, 110, 200); renderer.DirectionalLights.Add(new DeferredDirectionalLight(this, SunPosition, Vector3.Zero, Color.White, 1, true)); }
public Game1() : base() { graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 800; camera = new Base3DCamera(this, .1f, 20000); BasicColumnScene = new BaseDeferredObject(this); BasicColumnScene.Position = new Vector3(0, -1, 0); BasicColumnScene.Scale = new Vector3(.5f, 1, .5f); BasicColumnScene.Mesh = "Models/BasicColumnScene"; BasicColumnScene.TextureMaterials.Add("Textures/floor_color"); BasicColumnScene.TextureMaterials.Add("Textures/bricks_color"); BasicColumnScene.NormalMaterials.Add("Textures/floor_normal"); BasicColumnScene.NormalMaterials.Add("Textures/bricks_normal"); Components.Add(BasicColumnScene); dude = new BaseDeferredSkinnedObject(this); dude.Position = new Vector3(0, -1, -5); dude.AnimationClip = "Take 001"; dude.Scale = Vector3.One * .05f; dude.Mesh = "Models/dude"; Components.Add(dude); SunPosition = new Vector3(100, 300, -200); renderer.DirectionalLights.Add(new DeferredDirectionalLight(this, SunPosition, Vector3.Zero, Color.White, directionalIntensity, true)); renderer.ConeLights.Add(new DeferredConeLight(this, Vector3.Zero + Vector3.Up * 5, new Vector3(0, 0, -20), Color.White, 1.5f, coneAngle, codeDecay, true)); renderer.ConeLights.Add(new DeferredConeLight(this, Vector3.Zero + Vector3.Up * 5, new Vector3(0, 0, 20), Color.White, 1.5f, coneAngle, codeDecay, true)); renderer.ConeLights.Add(new DeferredConeLight(this, Vector3.Zero + Vector3.Up * 5, new Vector3(20, 0, 0), Color.White, 1.5f, coneAngle, codeDecay, true)); renderer.ConeLights.Add(new DeferredConeLight(this, Vector3.Zero + Vector3.Up * 5, new Vector3(-20, 0, 0), Color.White, 1.5f, coneAngle, codeDecay, true)); renderer.PointLights.Add(new DeferredPointLight(new Vector3(-10, 5, -10), Color.White, 10, 2, false)); renderer.PointLights.Add(new DeferredPointLight(new Vector3(10, 5, -10), Color.Red, 10, 2, false)); renderer.PointLights.Add(new DeferredPointLight(new Vector3(0, 5, 0), Color.Green, 11, 2, false)); renderer.PointLights.Add(new DeferredPointLight(new Vector3(-10, 5, 10), Color.Blue, 10, 2, false)); renderer.PointLights.Add(new DeferredPointLight(new Vector3(10, 5, 10), Color.Gold, 10, 2, false)); }