fixed some bugs

This commit is contained in:
Zyb3rWolfi 2025-11-28 20:18:18 +00:00
parent 8e794f47fa
commit c175d01ead
3 changed files with 6 additions and 8 deletions

View File

@ -60,9 +60,9 @@ namespace TheLabs
// --- Set up Lighting and Material --- // --- Set up Lighting and Material ---
_mainLight = new Lighting(new Vector3( _mainLight = new Lighting(new Vector3(
1.2f, 1.0f, 2.0f), 1.2f, 1.0f, 2.0f),
new Vector3(0.5f), new Vector3(5.0f),
new Vector3(1.5f), new Vector3(1.5f),
new Vector3(1.0f)); new Vector3(4.0f));
_defaultMaterial = new Material( _defaultMaterial = new Material(
new Vector3(0.5f, 0.5f, 0.5f) * 0.1f, new Vector3(0.5f, 0.5f, 0.5f) * 0.1f,
@ -92,7 +92,7 @@ namespace TheLabs
_buildingRender.NormalMap = _normalMap; _buildingRender.NormalMap = _normalMap;
_buildingNode = new SceneNode(_buildingRender); _buildingNode = new SceneNode(_buildingRender);
_buildingNode.Position = new Vector3(2.0f, -1.0f, 0.0f); _buildingNode.Position = new Vector3(2.0f, -1.0f, 0.0f);
_buildingNode.Scale = new Vector3(0.1f, 0.1f, 0.1f); _buildingNode.Scale = new Vector3(0.9f, 0.1f, 0.1f);
_rootNode.AddChild(_buildingNode); _rootNode.AddChild(_buildingNode);
// Create Character Object // Create Character Object

View File

@ -36,8 +36,6 @@ public class RenderObject
public void Draw(Matrix4 view, Matrix4 projection, Lighting light) public void Draw(Matrix4 view, Matrix4 projection, Lighting light)
{ {
Vector3 pink = new Vector3(0.5f, 0.5f, 0.5f);
Material mat = new Material(pink * 0.1f, pink * 0.6f, Vector3.One, 32.0f);
Shader.Use(); Shader.Use();
if (Texture != null && UseTexture) if (Texture != null && UseTexture)

View File

@ -30,9 +30,9 @@ public class SceneNode
if (RenderObject != null) if (RenderObject != null)
{ {
RenderObject.Position = Vector3.Zero; RenderObject.Position = Position;
RenderObject.Rotation = Quaternion.Identity; RenderObject.Rotation = Rotation;
RenderObject.Scale = Vector3.One; RenderObject.Scale = Scale;
RenderObject.Draw(view, projection, light); RenderObject.Draw(view, projection, light);
} }