Merge pull request 'dev' (#2) from dev into master

Reviewed-on: https://git.austinwhoover.com/gitadmin/Renderer/pulls/2
This commit is contained in:
gitadmin 2021-10-26 00:15:28 +00:00
commit 7bb796933c
317 changed files with 28527 additions and 1646 deletions

22
.gitignore vendored
View File

@ -1 +1,21 @@
/target/
/target
/**/.DS_Store
/build
/launcher/launcher.exe
/dependency-reduced-pom.xml
/nb-configuration.xml
/Telephone-*.jar
/hs_err_pid*
.classpath
.project
.settings
.vscode
.dbeaver

35
Scripts/clearTables.sql Normal file
View File

@ -0,0 +1,35 @@
--main Table
DROP TABLE IF EXISTS mainTable;
--charas
--positions
DROP TABLE IF EXISTS charaWorldPositions;
DROP INDEX IF EXISTS charaWorldPositionsIDIndex;
DROP INDEX IF EXISTS charaWorldPositionsPosIndex;
--data
DROP TABLE IF EXISTS charaData;
DROP INDEX IF EXISTS charaDataIDIndex;
DROP INDEX IF EXISTS charaDataPosIndex;
--towns
--positions
DROP TABLE IF EXISTS townWorldPositions;
DROP INDEX IF EXISTS townWorldPositionsIDIndex;
DROP INDEX IF EXISTS townWorldPositionsPosIndex;
--data
DROP TABLE IF EXISTS townData;
DROP INDEX IF EXISTS townDataIDIndex;
DROP INDEX IF EXISTS townDataPosIndex;
--structs
--positions
DROP TABLE IF EXISTS structWorldPositions;
DROP INDEX IF EXISTS structWorldPositionsIDIndex;
DROP INDEX IF EXISTS structWorldPositionsPosIndex;
--data
DROP TABLE IF EXISTS structData;
DROP INDEX IF EXISTS structDataIDIndex;
DROP INDEX IF EXISTS structDataPosIndex;

38
Scripts/createTables.sql Normal file
View File

@ -0,0 +1,38 @@
--main table
CREATE TABLE mainTable (propName VARCHAR PRIMARY KEY, propValue VARCHAR);
INSERT INTO mainTable (propName, propValue) VALUES ("ver","1");
--characters
--positions
CREATE TABLE charaWorldPositions (id INTEGER PRIMARY KEY, charID INTEGER, posX INTEGER, posY INTEGER);
CREATE INDEX charaWorldPositionsIDIndex ON charaWorldPositions (charID);
CREATE INDEX charaWorldPositionsPosIndex ON charaWorldPositions (posX, posY);
--data
CREATE TABLE charaData (id INTEGER PRIMARY KEY, charID INTEGER, dataVal VARCHAR);
CREATE INDEX charaDataIDIndex ON charaData (charID);
--towns
--positions
CREATE TABLE townWorldPositions (id INTEGER PRIMARY KEY, townID INTEGER, posX INTEGER, posY INTEGER);
CREATE INDEX townWorldPositionsIDIndex ON townWorldPositions (townID);
CREATE INDEX townWorldPositionsPosIndex ON townWorldPositions (posX, posY);
--data
CREATE TABLE townData (id INTEGER PRIMARY KEY, townID INTEGER, dataVal VARCHAR);
CREATE INDEX townDataIDIndex ON townData (townID);
--structures
--positions
CREATE TABLE structWorldPositions (id INTEGER PRIMARY KEY, structID INTEGER, posX INTEGER, posY INTEGER);
CREATE INDEX structWorldPositionsIDIndex ON structWorldPositions (structID);
CREATE INDEX structWorldPositionsPosIndex ON structWorldPositions (posX, posY);
--data
CREATE TABLE structData (id INTEGER PRIMARY KEY, structID INTEGER, dataVal VARCHAR);
CREATE INDEX structDataIDIndex ON structData (structID);

View File

@ -0,0 +1,6 @@
--positions
INSERT INTO structWorldPositions (structID,posX,posY) VALUES (0,10,10);
--data
INSERT INTO structData(structID,dataVal) VALUES(0,'{"localX"=10,"localY"=10}');

View File

@ -0,0 +1,6 @@
--positions
DELETE FROM structWorldPositions WHERE structID=0;
--data
DELETE FROM structData WHERE structID=0;

View File

@ -0,0 +1 @@
SELECT * FROM structData WHERE structID IN (1, 2);

View File

@ -0,0 +1 @@
SELECT * FROM structData WHERE structID=0;

View File

@ -0,0 +1 @@
SELECT * FROM structWorldPositions WHERE posX = 10 AND posY = 10;

View File

@ -0,0 +1,6 @@
--positions
INSERT INTO townWorldPositions (townID,posX,posY) VALUES (0,10,10);
--data
INSERT INTO townData(townID,propName,propValue) VALUES(0,"name","someTown");

View File

@ -0,0 +1,6 @@
--positions
DELETE FROM townWorldPositions WHERE townID=0;
--data
DELETE FROM townData WHERE townID=0;

View File

@ -0,0 +1,2 @@
--given x=10, y=11
SELECT townID FROM townWorldPositions WHERE posX = 10 AND posY = 11;

121
assets/Config/keybinds.json Normal file
View File

@ -0,0 +1,121 @@
{
"state": "TITLE_MENU",
"mouseIsVisible" : true,
"controls": {
"moveForward": {
"isKey": true,
"isMouse": false,
"keyValue": 87
},
"menuType9": {
"isKey": true,
"isMouse": false,
"keyValue": 57
},
"menuTypeBackspace": {
"isKey": true,
"isMouse": false,
"keyValue": 259
},
"moveBackward": {
"isKey": true,
"isMouse": false,
"keyValue": 83
},
"menuType0": {
"isKey": true,
"isMouse": false,
"keyValue": 48
},
"menuType.": {
"isKey": true,
"isMouse": false,
"keyValue": 46
},
"fall": {
"isKey": true,
"isMouse": false,
"keyValue": 341
},
"moveRight": {
"isKey": true,
"isMouse": false,
"keyValue": 68
},
"menuSelect": {
"isKey": true,
"isMouse": false,
"keyValue": 257
},
"menuType7": {
"isKey": true,
"isMouse": false,
"keyValue": 55
},
"menuDecrement": {
"isKey": true,
"isMouse": false,
"keyValue": 265
},
"menuBackout": {
"isKey": true,
"isMouse": false,
"keyValue": 256
},
"menuType8": {
"isKey": true,
"isMouse": false,
"keyValue": 56
},
"moveLeft": {
"isKey": true,
"isMouse": false,
"keyValue": 65
},
"menuType5": {
"isKey": true,
"isMouse": false,
"keyValue": 53
},
"menuType6": {
"isKey": true,
"isMouse": false,
"keyValue": 54
},
"menuType3": {
"isKey": true,
"isMouse": false,
"keyValue": 51
},
"menuType4": {
"isKey": true,
"isMouse": false,
"keyValue": 52
},
"menuIncrement": {
"isKey": true,
"isMouse": false,
"keyValue": 264
},
"menuType1": {
"isKey": true,
"isMouse": false,
"keyValue": 49
},
"jump": {
"isKey": true,
"isMouse": false,
"keyValue": 32
},
"menuType2": {
"isKey": true,
"isMouse": false,
"keyValue": 50
},
"attackPrimary" : {
"isKey": false,
"isMouse": true,
"keyValue": 0
}
}
}

View File

@ -0,0 +1,51 @@
{
"state": "TITLE_MENU",
"controlsMap": {
"moveForward": 87,
"menuType9": 57,
"menuTypeBackspace": 259,
"moveBackward": 83,
"menuType0": 48,
"menuType.": 46,
"fall": 341,
"moveRight": 68,
"menuSelect": 257,
"menuType7": 55,
"menuDecrement": 265,
"menuBackout": 256,
"menuType8": 56,
"moveLeft": 65,
"menuType5": 53,
"menuType6": 54,
"menuType3": 51,
"menuType4": 52,
"menuIncrement": 264,
"menuType1": 49,
"jump": 32,
"menuType2": 50
},
"controlsState": {
"moveForward": false,
"menuType9": false,
"menuTypeBackspace": false,
"moveBackward": false,
"menuType0": false,
"menuType.": false,
"fall": false,
"moveRight": false,
"menuSelect": false,
"menuType7": false,
"menuDecrement": false,
"menuBackout": false,
"menuType8": false,
"moveLeft": false,
"menuType5": false,
"menuType6": false,
"menuType3": false,
"menuType4": false,
"menuIncrement": false,
"menuType1": false,
"jump": false,
"menuType2": false
}
}

View File

@ -0,0 +1,19 @@
{
"gameplayGenerateWorld" : false,
"gameplayPhysicsCellRadius" : 2,
"displayWidth" : 1920,
"displayHeight" : 1080,
"graphicsFOV" : 100.0,
"graphicsPerformanceLODChunkRadius" : 3,
"graphicsPerformanceEnableVSync" : false,
"graphicsPerformanceDrawShadows" : true,
"graphicsDebugDrawCollisionSpheres" : false,
"graphicsDebugDrawPhysicsObjects" : false,
"graphicsDebugDrawMovementVectors" : false
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,10 @@
{
"Civilizations" : [
{
"name" : "Humans",
"allowedCreatures" : [
"Human"
]
}
]
}

358
assets/Data/creatures.json Normal file
View File

@ -0,0 +1,358 @@
{
"creatures" : [
{
"name" : "Human",
"bodyParts" : [
{
"name" : "Head",
"type" : "Head"
},
{
"name" : "Torso",
"type" : "Torso"
},
{
"name" : "ArmLeft",
"type" : "Arm"
},
{
"name" : "ArmRight",
"type" : "Arm"
},
{
"name" : "LegLeft",
"type" : "Leg"
},
{
"name" : "LegRight",
"type" : "Leg"
}
],
"hitboxes" : [
{
"type": "hurt",
"bone": "Bone.031",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.012",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.003",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.010",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.001",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.014",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone",
"radius": 0.08
},
{
"type": "hurt",
"bone": "Bone.014",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.019",
"radius": 0.04
}
],
"tokens" : [
"BLENDER_TRANSFORM",
"SENTIENT",
"ATTACKER",
"GRAVITY"
],
"movementSystems" : [
{
"type" : "GROUND",
"acceleration" : 0.15,
"maxVelocity" : 1.5
}
],
"physicsObject" : {
"type" : "CYLINDER",
"dimension1" : 0.1,
"dimension2" : 0.45,
"dimension3" : 0.1,
"offsetX" : 0,
"offsetY" : 0.45,
"offsetZ" : 0
},
"attackMoves" : [
{
"type" : "MELEE_WEAPON_SWING_ONE_HAND",
"animationName" : "Armature|SwingWeapon",
"damageStartFrame" : 30,
"damageEndFrame" : 120
}
],
"healthSystem" : {
"maxHealth" : 100,
"onDamageIFrames" : 30
},
"modelPath" : "Models/person1animpass2.fbx"
},
{
"name" : "Goblin",
"bodyParts" : [
{
"name" : "Head",
"type" : "Head"
},
{
"name" : "Torso",
"type" : "Torso"
},
{
"name" : "ArmLeft",
"type" : "Arm"
},
{
"name" : "ArmRight",
"type" : "Arm"
},
{
"name" : "LegLeft",
"type" : "Leg"
},
{
"name" : "LegRight",
"type" : "Leg"
}
],
"hitboxes" : [
{
"type": "hurt",
"bone": "Bone.031",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.012",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.003",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.010",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.001",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.014",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone",
"radius": 0.08
},
{
"type": "hurt",
"bone": "Bone.014",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.019",
"radius": 0.04
}
],
"tokens" : [
"BLENDER_TRANSFORM",
"SENTIENT",
"ATTACKER",
"GRAVITY"
],
"movementSystems" : [
{
"type" : "GROUND",
"acceleration" : 0.001,
"maxVelocity" : 0.025
}
],
"physicsObject" : {
"type" : "CYLINDER",
"dimension1" : 0.1,
"dimension2" : 0.2,
"dimension3" : 0.1,
"offsetX" : 0,
"offsetY" : 0.2,
"offsetZ" : 0
},
"attackMoves" : [
{
"type" : "MELEE_WEAPON_SWING_ONE_HAND",
"animationName" : "Armature|SwingWeapon",
"damageStartFrame" : 10,
"damageEndFrame" : 30
}
],
"healthSystem" : {
"maxHealth" : 100,
"onDamageIFrames" : 30
},
"modelPath" : "Models/goblin1.fbx"
},
{
"name" : "CUBE_MAN",
"bodyParts" : [
{
"name" : "CUBE",
"type" : "CUBE_MAN"
}
],
"hitboxes" : [],
"tokens" : [
"BLENDER_TRANSFORM",
"SENTIENT",
"GRAVITY"
],
"movementSystems" : [
{
"type" : "GROUND",
"acceleration" : 0.15,
"maxVelocity" : 1
}
],
"physicsObject" : {
"type" : "CYLINDER",
"dimension1" : 0.1,
"dimension2" : 0.45,
"dimension3" : 0.1,
"offsetX" : 0,
"offsetY" : 0.45,
"offsetZ" : 0
},
"healthSystem" : {
"maxHealth" : 100,
"onDamageIFrames" : 30
},
"modelPath" : "Models/unitcube.fbx"
},
{
"name" : "Deer",
"bodyParts" : [
{
"name" : "Head",
"type" : "Head"
},
{
"name" : "Torso",
"type" : "Torso"
}
],
"hitboxes" : [
{
"type": "hurt",
"bone": "Bone",
"radius": 0.04
}
],
"tokens" : [
"BLENDER_TRANSFORM",
"GRAVITY"
],
"movementSystems" : [
{
"type" : "GROUND",
"acceleration" : 0.001,
"maxVelocity" : 0.025
}
],
"physicsObject" : {
"type" : "CYLINDER",
"dimension1" : 0.1,
"dimension2" : 0.2,
"dimension3" : 0.1,
"offsetX" : 0,
"offsetY" : 0.2,
"offsetZ" : 0
},
"healthSystem" : {
"maxHealth" : 100,
"onDamageIFrames" : 30
},
"modelPath" : "Models/deer1.fbx"
}
]
}

23
assets/Data/foliage.json Normal file
View File

@ -0,0 +1,23 @@
{
"foliageList" : [
{
"name" : "FallOak1",
"tokens" : [
"BLENDER_ROTATION"
],
"physicsObjects" : [
{
"type" : "CYLINDER",
"dimension1" : 0.1,
"dimension2" : 0.45,
"dimension3" : 0.1,
"offsetX" : 0,
"offsetY" : 0.45,
"offsetZ" : 0
}
],
"modelPath" : "Models/falloak1.fbx"
}
]
}

37
assets/Data/items.json Normal file
View File

@ -0,0 +1,37 @@
{
"items" : [
{
"name" : "Katana",
"modelPath" : "Models/katana1alt.fbx",
"hitboxes" : [
{
"type": "hit",
"bone": "Blade1",
"radius": 0.04
},
{
"type": "hit",
"bone": "Blade2",
"radius": 0.04
},
{
"type": "hit",
"bone": "Blade3",
"radius": 0.04
}
],
"tokens" : [
"BLENDER_TRANSFORM",
"WEAPON",
"MELEE"
]
}
]
}

8
assets/Data/races.json Normal file
View File

@ -0,0 +1,8 @@
{
"raceMap" : [
{
"name" : "Human",
"associatedCreature" : "Human"
}
]
}

141
assets/Data/structures.json Normal file
View File

@ -0,0 +1,141 @@
{
"structures" : [
{
"name" : "building1",
"modelPath" : "Models/building1.fbx",
"radius" : 10,
"collision" : [
{
"type" : "CUBE",
"positionX" : 0,
"positionY" : -1,
"positionZ" : 0.3,
"scaleX" : 7.5,
"scaleY" : 1.5,
"scaleZ" : 0.3,
"rotationW" : 1,
"rotationX" : 0,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : 7.2,
"positionY" : -1,
"positionZ" : 3,
"scaleX" : 0.3,
"scaleY" : 1.5,
"scaleZ" : 3,
"rotationW" : 1,
"rotationX" : 0,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : 7.2,
"positionY" : 0.4,
"positionZ" : 3,
"scaleX" : 0.3,
"scaleY" : 2,
"scaleZ" : 2,
"rotationW" : 0.9238796,
"rotationX" : 0.3826834,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : -7.2,
"positionY" : -1,
"positionZ" : 3,
"scaleX" : 0.3,
"scaleY" : 1.5,
"scaleZ" : 3,
"rotationW" : 1,
"rotationX" : 0,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : -7.2,
"positionY" : 0.4,
"positionZ" : 3,
"scaleX" : 0.3,
"scaleY" : 2,
"scaleZ" : 2,
"rotationW" : 0.9238796,
"rotationX" : 0.3826834,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : -1.5,
"positionY" : -1,
"positionZ" : 5.7,
"scaleX" : 5.5,
"scaleY" : 1.5,
"scaleZ" : 0.3,
"rotationW" : 1,
"rotationX" : 0,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : 6.75,
"positionY" : -1,
"positionZ" : 5.7,
"scaleX" : 0.75,
"scaleY" : 1.5,
"scaleZ" : 0.3,
"rotationW" : 1,
"rotationX" : 0,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : 0,
"positionY" : -2.6,
"positionZ" : 3,
"scaleX" : 7.5,
"scaleY" : 0.2,
"scaleZ" : 3,
"rotationW" : 1,
"rotationX" : 0,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : 0,
"positionY" : 1.3,
"positionZ" : 4.4,
"scaleX" : 7.5,
"scaleY" : 0.2,
"scaleZ" : 1.8,
"rotationW" : 0.9570922,
"rotationX" : 0.2897836,
"rotationY" : 0,
"rotationZ" : 0
},
{
"type" : "CUBE",
"positionX" : 0,
"positionY" : 1.3,
"positionZ" : 1.6,
"scaleX" : 7.5,
"scaleY" : 0.2,
"scaleZ" : 1.8,
"rotationW" : 0.9570922,
"rotationX" : -0.2897836,
"rotationY" : 0,
"rotationZ" : 0
}
]
}
]
}

583
assets/Data/symbolism.json Normal file
View File

@ -0,0 +1,583 @@
{
"symbolismMap" : [
{
"name" : "wind",
"relations" : [
{
"name" : "water",
"strength" : -1
}
]
},
{
"name" : "fire",
"relations" : [
]
},
{
"name" : "earth",
"relations" : [
]
},
{
"name" : "ice",
"relations" : [
]
},
{
"name" : "water",
"relations" : [
]
},
{
"name" : "lightning",
"relations" : [
]
},
{
"name" : "metal",
"relations" : [
]
},
{
"name" : "crystal",
"relations" : [
]
},
{
"name" : "storm",
"relations" : [
]
},
{
"name" : "lava",
"relations" : [
]
},
{
"name" : "gravity",
"relations" : [
]
},
{
"name" : "light",
"relations" : [
]
},
{
"name" : "dark",
"relations" : [
]
},
{
"name" : "arcane",
"relations" : [
]
},
{
"name" : "time",
"relations" : [
]
},
{
"name" : "sound",
"relations" : [
]
},
{
"name" : "poison",
"relations" : [
]
},
{
"name" : "mirror",
"relations" : [
]
},
{
"name" : "barrier",
"relations" : [
]
},
{
"name" : "void",
"relations" : [
]
},
{
"name" : "crescent",
"relations" : [
]
},
{
"name" : "life",
"relations" : [
]
},
{
"name" : "death",
"relations" : [
]
},
{
"name" : "nightmare",
"relations" : [
]
},
{
"name" : "dream",
"relations" : [
]
},
{
"name" : "sleep",
"relations" : [
]
},
{
"name" : "sky",
"relations" : [
]
},
{
"name" : "speed",
"relations" : [
]
},
{
"name" : "mind",
"relations" : [
]
},
{
"name" : "dawn",
"relations" : [
]
},
{
"name" : "dusk",
"relations" : [
]
},
{
"name" : "spring",
"relations" : [
]
},
{
"name" : "summer",
"relations" : [
]
},
{
"name" : "fall",
"relations" : [
]
},
{
"name" : "winter",
"relations" : [
]
},
{
"name" : "hunting",
"relations" : [
]
},
{
"name" : "sun",
"relations" : [
]
},
{
"name" : "moon",
"relations" : [
]
},
{
"name" : "sky",
"relations" : [
]
},
{
"name" : "earth",
"relations" : [
]
},
{
"name" : "cloud",
"relations" : [
]
},
{
"name" : "song",
"relations" : [
]
},
{
"name" : "harmony",
"relations" : [
]
},
{
"name" : "discord",
"relations" : [
]
},
{
"name" : "beginning",
"relations" : [
]
},
{
"name" : "end",
"relations" : [
]
},
{
"name" : "moral",
"relations" : [
]
},
{
"name" : "amoral",
"relations" : [
]
},
{
"name" : "storm",
"relations" : [
]
},
{
"name" : "flower",
"relations" : [
]
},
{
"name" : "shadow",
"relations" : [
]
},
{
"name" : "wealth",
"relations" : [
]
},
{
"name" : "poverty",
"relations" : [
]
},
{
"name" : "undeath",
"relations" : [
]
},
{
"name" : "afterlife",
"relations" : [
]
},
{
"name" : "logic",
"relations" : [
]
},
{
"name" : "writing",
"relations" : [
]
},
{
"name" : "violence",
"relations" : [
]
},
{
"name" : "warfare",
"relations" : [
]
},
{
"name" : "strategy",
"relations" : [
]
},
{
"name" : "trade",
"relations" : [
]
},
{
"name" : "law",
"relations" : [
]
},
{
"name" : "order",
"relations" : [
]
},
{
"name" : "justice",
"relations" : [
]
},
{
"name" : "marriage",
"relations" : [
]
},
{
"name" : "family",
"relations" : [
]
},
{
"name" : "sea",
"relations" : [
]
},
{
"name" : "harvest",
"relations" : [
]
},
{
"name" : "argiculture",
"relations" : [
]
},
{
"name" : "nature",
"relations" : [
]
},
{
"name" : "wisdom",
"relations" : [
]
},
{
"name" : "handicraft",
"relations" : [
]
},
{
"name" : "prophecy",
"relations" : [
]
},
{
"name" : "philosophy",
"relations" : [
]
},
{
"name" : "archery",
"relations" : [
]
},
{
"name" : "truth",
"relations" : [
]
},
{
"name" : "inspiration",
"relations" : [
]
},
{
"name" : "poety",
"relations" : [
]
},
{
"name" : "art",
"relations" : [
]
},
{
"name" : "medicine",
"relations" : [
]
},
{
"name" : "healing",
"relations" : [
]
},
{
"name" : "wilderness",
"relations" : [
]
},
{
"name" : "protection",
"relations" : [
]
},
{
"name" : "love",
"relations" : [
]
},
{
"name" : "invention",
"relations" : [
]
},
{
"name" : "volcanoes",
"relations" : [
]
},
{
"name" : "travel",
"relations" : [
]
},
{
"name" : "communication",
"relations" : [
]
},
{
"name" : "borders",
"relations" : [
]
},
{
"name" : "diplomacy",
"relations" : [
]
},
{
"name" : "theft",
"relations" : [
]
},
{
"name" : "game",
"relations" : [
]
},
{
"name" : "civilization",
"relations" : [
]
},
{
"name" : "structure",
"relations" : [
]
},
{
"name" : "festivity",
"relations" : [
]
},
{
"name" : "madness",
"relations" : [
]
}
]
}

BIN
assets/Models/SmallCube.fbx Normal file

Binary file not shown.

BIN
assets/Models/Wheat1.fbx Normal file

Binary file not shown.

BIN
assets/Models/building1.fbx Normal file

Binary file not shown.

BIN
assets/Models/deer1.fbx Normal file

Binary file not shown.

BIN
assets/Models/falloak1.fbx Normal file

Binary file not shown.

BIN
assets/Models/goblin1.fbx Normal file

Binary file not shown.

BIN
assets/Models/katana1.fbx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/Models/tree1.fbx Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/Models/unitplane.fbx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/Models/wheat2.fbx Normal file

Binary file not shown.

View File

@ -0,0 +1,191 @@
#version 330 core
out vec4 FragColor;
struct Material {
sampler2D diffuse;
sampler2D specular;
float shininess;
};
struct DirLight {
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct PointLight {
vec3 position;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct SpotLight {
vec3 position;
vec3 direction;
float cutOff;
float outerCutOff;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
#define NR_POINT_LIGHTS 10
in vec3 FragPos;
in vec3 Normal;
in vec2 TexCoord;
in vec4 FragPosLightSpace;
uniform vec3 viewPos;
uniform DirLight dirLight;
uniform PointLight pointLights[NR_POINT_LIGHTS];
uniform SpotLight spotLight;
uniform Material material;
//texture stuff
// uniform sampler2D ourTexture;
uniform int hasTransparency;
// uniform sampler2D specularTexture;
//light depth map
uniform sampler2D shadowMap;
// function prototypes
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir);
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal);
void main(){
if(hasTransparency == 1){
if(texture(material.diffuse, TexCoord).a < 0.1){
discard;
}
}
vec3 norm = normalize(Normal);
vec3 viewDir = normalize(viewPos - FragPos);
vec3 result = CalcDirLight(dirLight, norm, viewDir);
//for(int i = 0; i < NR_POINT_LIGHTS; i++){
// result += CalcPointLight(pointLights[i], norm, FragPos, viewDir);
//}
//result += CalcSpotLight(spotLight, norm, FragPos, viewDir);
FragColor = vec4(result, texture(material.diffuse, TexCoord).a);//texture(ourTexture, TexCoord);//vec4(result, 1.0);
}
// calculates the color when using a directional light.
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir){
vec3 lightDir = normalize(-light.direction);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// combine results
vec3 texColor = texture(material.diffuse, TexCoord).rgb;
vec3 ambient = light.ambient;
vec3 diffuse = light.diffuse * diff;
//vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord).rgb);
float shadow = ShadowCalculation(FragPosLightSpace, lightDir, normal);
return ( ambient + (1.0-shadow) * diffuse ) * texColor;// + specular);
}
// calculates the color when using a point light.
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir){
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// combine results
vec3 ambient = light.ambient * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 diffuse = light.diffuse * diff * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 specular = light.specular * spec * vec4(texture(material.specular, TexCoord)).xyz;
ambient *= attenuation;
diffuse *= attenuation;
specular *= attenuation;
return (ambient + diffuse + specular);
}
// calculates the color when using a spot light.
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir)
{
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// spotlight intensity
float theta = dot(lightDir, normalize(-light.direction));
float epsilon = light.cutOff - light.outerCutOff;
float intensity = clamp((theta - light.outerCutOff) / epsilon, 0.0, 1.0);
// combine results
vec3 ambient = light.ambient * vec3(texture(material.diffuse, TexCoord));
vec3 diffuse = light.diffuse * diff * vec3(texture(material.diffuse, TexCoord));
vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord));
ambient *= attenuation * intensity;
diffuse *= attenuation * intensity;
specular *= attenuation * intensity;
return (ambient + diffuse + specular);
}
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal){
// perform perspective divide
vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w;
//transform to NDC
projCoords = projCoords * 0.5 + 0.5;
//get closest depth from light's POV
float closestDepth = texture(shadowMap, projCoords.xy).r;
//get depth of current fragment
float currentDepth = projCoords.z;
//calculate bias
float bias = max(0.05 * (1.0 - dot(normal, lightDir)), 0.005);
//calculate shadow value
float shadow = currentDepth - bias > closestDepth ? 1.0 : 0.0;
if(projCoords.z > 1.0){
shadow = 0.0;
}
// shadow = currentDepth;
return shadow;
}

View File

@ -0,0 +1,71 @@
//Vertex Shader
#version 330 core
//input buffers
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec4 aWeights;
layout (location = 3) in vec4 aIndex;
layout (location = 4) in vec2 aTex;
//coordinate space transformation matrices
uniform mat4 transform;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 lightSpaceMatrix;
//bone related variables
const int MAX_WEIGHTS = 4;
const int MAX_BONES = 100;
uniform mat4 bones[MAX_BONES];
uniform int hasBones;
uniform int numBones;
//output buffers
out vec3 Normal;
out vec3 FragPos;
out vec2 TexCoord;
out vec4 FragPosLightSpace;
void main() {
//calculate bone transform
mat4 BoneTransform = (bones[int(aIndex[0])] * aWeights[0]);
BoneTransform = BoneTransform + (bones[int(aIndex[1])] * aWeights[1]);
BoneTransform = BoneTransform + (bones[int(aIndex[2])] * aWeights[2]);
BoneTransform = BoneTransform + (bones[int(aIndex[3])] * aWeights[3]);
//apply bone transform to position vectors
vec4 FinalVertex = BoneTransform * vec4(aPos, 1.0);
vec4 FinalNormal = BoneTransform * vec4(aNormal, 1.0);
//make sure the W component is 1.0
FinalVertex = vec4(FinalVertex.xyz, 1.0);
FinalNormal = vec4(FinalNormal.xyz, 1.0);
//push frag, normal, and texture positions to fragment shader
FragPos = vec3(model * FinalVertex);
Normal = mat3(transpose(inverse(model))) * aNormal;
TexCoord = aTex;
//shadow map stuff
FragPosLightSpace = lightSpaceMatrix * vec4(FragPos, 1.0);
//set final position with opengl space
gl_Position = projection * view * model * FinalVertex;
}

View File

@ -14,6 +14,7 @@ uniform mat4 transform;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 lightSpaceMatrix;
@ -21,19 +22,27 @@ uniform mat4 projection;
out vec3 Normal;
out vec3 FragPos;
out vec2 TexCoord;
out vec4 FragPosLightSpace;
void main()
{
void main() {
//normalize posiiton and normal
vec4 FinalVertex = vec4(aPos, 1.0);
vec4 FinalNormal = vec4(aNormal, 1.0);
//push frag, normal, and texture positions to fragment shader
FragPos = vec3(model * FinalVertex);
Normal = mat3(transpose(inverse(model))) * aNormal;
TexCoord = aTex;
//shadow map stuff
FragPosLightSpace = lightSpaceMatrix * vec4(FragPos, 1.0);
//set final position with opengl space
gl_Position = projection * view * model * FinalVertex;
}

View File

@ -0,0 +1,18 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D screenTexture;
uniform vec3 color;
void main(){
vec3 textColorModifier = color;
if(color.x == 0 && color.y == 0 && color.z == 0){
textColorModifier.x = 1;
textColorModifier.y = 1;
textColorModifier.z = 1;
}
FragColor = texture(screenTexture, TexCoords) * vec4(textColorModifier.xyz, 1.0);
}

View File

@ -0,0 +1,28 @@
#version 330 core
layout (location = 0) in vec2 aPos;
layout (location = 4) in vec2 aTexCoords;
out vec2 TexCoords;
uniform vec3 mPosition;
uniform vec3 mDimension;
uniform vec3 tPosition;
uniform vec3 tDimension;
void main(){
vec2 finalPos = vec2(
aPos.x * mDimension.x + mPosition.x,
aPos.y * mDimension.y + mPosition.y
);
gl_Position = vec4(finalPos.x, finalPos.y, 0.0, 1.0);
vec2 finalTex = vec2(
aTexCoords.x * tDimension.x + tPosition.x,
aTexCoords.y * tDimension.y + tPosition.y
);
TexCoords = finalTex;
}

View File

@ -0,0 +1,6 @@
#version 330 core
void main()
{
gl_FragDepth = gl_FragCoord.z;
}

View File

@ -0,0 +1,32 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 2) in vec4 aWeights;
layout (location = 3) in vec4 aIndex;
uniform mat4 lightSpaceMatrix;
uniform mat4 model;
//bone related variables
const int MAX_WEIGHTS = 4;
const int MAX_BONES = 100;
uniform mat4 bones[MAX_BONES];
uniform int numBones;
uniform int hasBones;
void main()
{
mat4 BoneTransform = (bones[int(aIndex[0])] * aWeights[0]);
BoneTransform = BoneTransform + (bones[int(aIndex[1])] * aWeights[1]);
BoneTransform = BoneTransform + (bones[int(aIndex[2])] * aWeights[2]);
BoneTransform = BoneTransform + (bones[int(aIndex[3])] * aWeights[3]);
//apply bone transform to position vectors
vec4 FinalVertex = BoneTransform * vec4(aPos, 1.0);
//normalize w component
FinalVertex = vec4(FinalVertex.xyz, 1.0);
if(hasBones == 0){
FinalVertex = vec4(aPos, 1.0);
}
gl_Position = lightSpaceMatrix * model * FinalVertex;
}

View File

@ -0,0 +1,191 @@
#version 330 core
out vec4 FragColor;
struct Material {
sampler2D diffuse;
sampler2D specular;
float shininess;
};
struct DirLight {
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct PointLight {
vec3 position;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct SpotLight {
vec3 position;
vec3 direction;
float cutOff;
float outerCutOff;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
#define NR_POINT_LIGHTS 10
in vec3 FragPos;
in vec3 Normal;
in vec2 TexCoord;
in vec4 FragPosLightSpace;
uniform vec3 viewPos;
uniform DirLight dirLight;
uniform PointLight pointLights[NR_POINT_LIGHTS];
uniform SpotLight spotLight;
uniform Material material;
//texture stuff
// uniform sampler2D ourTexture;
uniform int hasTransparency;
// uniform sampler2D specularTexture;
//light depth map
uniform sampler2D shadowMap;
// function prototypes
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir);
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal);
void main(){
if(hasTransparency == 1){
if(texture(material.diffuse, TexCoord).a < 0.1){
discard;
}
}
vec3 norm = normalize(Normal);
vec3 viewDir = normalize(viewPos - FragPos);
vec3 result = CalcDirLight(dirLight, norm, viewDir);
//for(int i = 0; i < NR_POINT_LIGHTS; i++){
// result += CalcPointLight(pointLights[i], norm, FragPos, viewDir);
//}
//result += CalcSpotLight(spotLight, norm, FragPos, viewDir);
FragColor = vec4(result, texture(material.diffuse, TexCoord).a);//texture(ourTexture, TexCoord);//vec4(result, 1.0);
}
// calculates the color when using a directional light.
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir){
vec3 lightDir = normalize(-light.direction);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// combine results
vec3 texColor = texture(material.diffuse, TexCoord).rgb;
vec3 ambient = light.ambient;
vec3 diffuse = light.diffuse * diff;
//vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord).rgb);
float shadow = ShadowCalculation(FragPosLightSpace, lightDir, normal);
return ( ambient + (1.0-shadow) * 1.0 ) * texColor;// + specular);
}
// calculates the color when using a point light.
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir){
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// combine results
vec3 ambient = light.ambient * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 diffuse = light.diffuse * diff * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 specular = light.specular * spec * vec4(texture(material.specular, TexCoord)).xyz;
ambient *= attenuation;
diffuse *= attenuation;
specular *= attenuation;
return (ambient + diffuse + specular);
}
// calculates the color when using a spot light.
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir)
{
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// spotlight intensity
float theta = dot(lightDir, normalize(-light.direction));
float epsilon = light.cutOff - light.outerCutOff;
float intensity = clamp((theta - light.outerCutOff) / epsilon, 0.0, 1.0);
// combine results
vec3 ambient = light.ambient * vec3(texture(material.diffuse, TexCoord));
vec3 diffuse = light.diffuse * diff * vec3(texture(material.diffuse, TexCoord));
vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord));
ambient *= attenuation * intensity;
diffuse *= attenuation * intensity;
specular *= attenuation * intensity;
return (ambient + diffuse + specular);
}
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal){
// perform perspective divide
vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w;
//transform to NDC
projCoords = projCoords * 0.5 + 0.5;
//get closest depth from light's POV
float closestDepth = texture(shadowMap, projCoords.xy).r;
//get depth of current fragment
float currentDepth = projCoords.z;
//calculate bias
float bias = max(0.05 * (1.0 - dot(normal, lightDir)), 0.005);
//calculate shadow value
float shadow = currentDepth - bias > closestDepth ? 1.0 : 0.0;
if(projCoords.z > 1.0){
shadow = 0.0;
}
// shadow = currentDepth;
return shadow;
}

View File

@ -0,0 +1,48 @@
//Vertex Shader
#version 330 core
//input buffers
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 4) in vec2 aTex;
//coordinate space transformation matrices
uniform mat4 transform;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 lightSpaceMatrix;
//output buffers
out vec3 Normal;
out vec3 FragPos;
out vec2 TexCoord;
out vec4 FragPosLightSpace;
void main() {
//normalize posiiton and normal
vec4 FinalVertex = vec4(aPos, 1.0);
vec4 FinalNormal = vec4(aNormal, 1.0);
//push frag, normal, and texture positions to fragment shader
FragPos = vec3(model * FinalVertex);
Normal = mat3(transpose(inverse(model))) * aNormal;
TexCoord = aTex;
//shadow map stuff
FragPosLightSpace = lightSpaceMatrix * vec4(FragPos, 1.0);
//set final position with opengl space
gl_Position = projection * view * model * FinalVertex;
}

View File

@ -0,0 +1,10 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D screenTexture;
void main(){
FragColor = texture(screenTexture, TexCoords);
}

View File

@ -0,0 +1,30 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 4) in vec2 aTexCoords;
out vec2 TexCoords;
uniform vec3 mPosition;
uniform vec3 mDimension;
uniform vec3 tPosition;
uniform vec3 tDimension;
void main(){
vec2 finalPos = vec2(
((aPos.x + 1)/2 * mDimension.x + mPosition.x) * 2 - 1,
((1-(aPos.y + 1)/2) * mDimension.y + mPosition.y) * 2 - 1
// aPos.y * mDimension.y + (mPosition.y) + (1 - mDimension.y)
);
gl_Position = vec4(finalPos.x, finalPos.y, 0.0, 1.0);
// vec2 finalTex = vec2(
// aTexCoords.x * tDimension.x + tPosition.x,
// aTexCoords.y * tDimension.y + tPosition.y
// );
vec2 finalTex = aTexCoords;
// vec2 finalTex = vec2(
// aTexCoords.x + 0.7,
// aTexCoords.y
// );
TexCoords = finalTex;
}

View File

@ -74,13 +74,10 @@ void main(){
}
vec3 norm = normalize(Normal);
vec3 viewDir = normalize(viewPos - FragPos);
vec3 reflected = reflect(viewDir,norm);
vec3 result = CalcDirLight(dirLight, norm, viewDir);
//for(int i = 0; i < NR_POINT_LIGHTS; i++){
// result += CalcPointLight(pointLights[i], norm, FragPos, viewDir);
//}
//result += CalcSpotLight(spotLight, norm, FragPos, viewDir);
FragColor = vec4(result, texture(material.diffuse, TexCoord).a);//texture(ourTexture, TexCoord);//vec4(result, 1.0);
FragColor = vec4(result, texture(material.diffuse, TexCoord).a);
}
// calculates the color when using a directional light.

View File

@ -0,0 +1,13 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D depthMap;
void main()
{
float depthValue = texture(depthMap, TexCoords).r;
FragColor = vec4(vec3(depthValue), 1.0);
}

View File

@ -0,0 +1,10 @@
#version 330 core
layout (location = 0) in vec2 aPos;
layout (location = 1) in vec2 aTexCoords;
out vec2 TexCoords;
void main(){
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
TexCoords = aTexCoords;
}

View File

@ -0,0 +1,10 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D screenTexture;
void main(){
FragColor = texture(screenTexture, TexCoords);
}

View File

@ -0,0 +1,10 @@
#version 330 core
layout (location = 0) in vec2 aPos;
layout (location = 1) in vec2 aTexCoords;
out vec2 TexCoords;
void main(){
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
TexCoords = aTexCoords;
}

View File

@ -29,6 +29,6 @@ void main()
//send color to the frag shader
color = colors[int(id)];
//set final position with opengl space
vec4 pos = projection * view * FinalVertex;
vec4 pos = projection * view * model * FinalVertex;
gl_Position = pos.xyww;
}

View File

@ -0,0 +1,275 @@
#version 410 core
out vec4 FragColor;
struct Material {
sampler2D diffuse;
sampler2D specular;
float shininess;
};
struct DirLight {
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct PointLight {
vec3 position;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct SpotLight {
vec3 position;
vec3 direction;
float cutOff;
float outerCutOff;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
#define NR_POINT_LIGHTS 10
in vec3 FragPos;
in vec3 Normal;
in vec2 TexCoord;
in vec4 FragPosLightSpace;
flat in ivec4 groundTexIndices;
uniform vec3 viewPos;
uniform DirLight dirLight;
uniform PointLight pointLights[NR_POINT_LIGHTS];
uniform SpotLight spotLight;
uniform Material material;
//texture stuff
// uniform sampler2D ourTexture;
uniform int hasTransparency;
// uniform sampler2D specularTexture;
//light depth map
uniform sampler2D shadowMap;
//textures
//
// Goal is to have a texture for the current chunk and one for each nearnby chunk
//
//
//
// uniform sampler2D groundTextures1;
// uniform sampler2D groundTextures2;
// uniform sampler2D groundTextures3;
// uniform sampler2D groundTextures4;
// //fifth texture unit is for shadow map
// uniform sampler2D groundTextures5;
//this is for bindable ground textures
uniform sampler2D groundTextures[10];
// function prototypes
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir, vec3 texColor);
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal);
vec3 blendedTextureColor(vec2 texPos, vec4 tex1, vec4 tex2, vec4 tex3, vec4 tex4);
vec4 getTextureColor(int index, vec2 coord){
if(index == 0){
return texture(groundTextures[0], coord);
}
if(index == 1){
return texture(groundTextures[1], coord);
}
if(index == 2){
return texture(groundTextures[2], coord);
}
if(index == 3){
return texture(groundTextures[3], coord);
}
if(index == 4){
return texture(groundTextures[4], coord);
}
// return vec3(1,1,1);
return vec4(0,0,0,0);
}
void main(){
if(hasTransparency == 1){
if(texture(material.diffuse, TexCoord).a < 0.1){
discard;
}
}
vec3 norm = normalize(Normal);
vec3 viewDir = normalize(viewPos - FragPos);
// sampler2DArray text = groundTextures;
// sampler2D test = groundTextures1;
vec4 texColor1 = getTextureColor(groundTexIndices.x, TexCoord);
vec4 texColor2 = getTextureColor(groundTexIndices.y, TexCoord);
vec4 texColor3 = getTextureColor(groundTexIndices.z, TexCoord);
vec4 texColor4 = getTextureColor(groundTexIndices.w, TexCoord);
// vec4 texColor1 = texture(groundTextures[groundTexIndices.x], TexCoord);
// vec4 texColor2 = texture(groundTextures[groundTexIndices.y], TexCoord);
// vec4 texColor3 = texture(groundTextures[groundTexIndices.z], TexCoord);
// vec4 texColor4 = texture(groundTextures[groundTexIndices.w], TexCoord);
// vec4 texColor1 = texture(groundTextures[0], TexCoord);
// vec4 texColor2 = texture(groundTextures[1], TexCoord);
// vec4 texColor3 = texture(groundTextures[1], TexCoord);
// vec4 texColor4 = texture(groundTextures[1], TexCoord);
vec3 finalTexColor = blendedTextureColor(TexCoord, texColor1, texColor2, texColor3, texColor4);
// vec3 finalTexColor = vec3(0,0,0);
// vec3 finalTexColor = mix(mix(texColor1,texColor2,TexCoord.x),mix(texColor3,texColor4,TexCoord.x),TexCoord.y).xyz;//blendedTextureColor(TexCoord, texColor1, texColor2, texColor3, texColor4);
// if(groundTexIndices.x != 1 || groundTexIndices.y != 0 || groundTexIndices.z != 0 || groundTexIndices.w != 0){
// finalTexColor = vec3(1,0,0);
// }
// vec3 finalTexColor = vec3(groundTexIndices.x,groundTexIndices.y,groundTexIndices.z);
// vec3 finalTexColor = vec3(1.0,0,0);
// vec4 tex2 = texture(groundTextures[int(groundTexIndices.y)], TexCoord);
// vec4 tex3 = texture2D(groundTextures[int(groundTexIndex.z * 2)], texPos);
// vec4 tex4 = texture2D(groundTextures[int(groundTexIndex.w * 2)], texPos);
//get texture color
// vec3 texColor = vec3(0,0,1);//blendedTextureColor(texPos, groundTexIndices);
vec3 result = CalcDirLight(dirLight, norm, viewDir, finalTexColor);
//for(int i = 0; i < NR_POINT_LIGHTS; i++){
// result += CalcPointLight(pointLights[i], norm, FragPos, viewDir);
//}
//result += CalcSpotLight(spotLight, norm, FragPos, viewDir);
FragColor = vec4(result, 1);//texture(ourTexture, TexCoord);//vec4(result, 1.0);
}
// calculates the color when using a directional light.
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir, vec3 texColor){
vec3 lightDir = normalize(-light.direction);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// combine results
// vec3 texColor = texture(material.diffuse, TexCoord).rgb;
vec3 ambient = light.ambient;
vec3 diffuse = light.diffuse * diff;
//vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord).rgb);
float shadow = ShadowCalculation(FragPosLightSpace, lightDir, normal);
return ( ambient + (1.0-shadow) * diffuse ) * texColor;// + specular);
}
// calculates the color when using a point light.
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir){
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// combine results
vec3 ambient = light.ambient * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 diffuse = light.diffuse * diff * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 specular = light.specular * spec * vec4(texture(material.specular, TexCoord)).xyz;
ambient *= attenuation;
diffuse *= attenuation;
specular *= attenuation;
return (ambient + diffuse + specular);
}
// calculates the color when using a spot light.
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir)
{
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// spotlight intensity
float theta = dot(lightDir, normalize(-light.direction));
float epsilon = light.cutOff - light.outerCutOff;
float intensity = clamp((theta - light.outerCutOff) / epsilon, 0.0, 1.0);
// combine results
vec3 ambient = light.ambient * vec3(texture(material.diffuse, TexCoord));
vec3 diffuse = light.diffuse * diff * vec3(texture(material.diffuse, TexCoord));
vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord));
ambient *= attenuation * intensity;
diffuse *= attenuation * intensity;
specular *= attenuation * intensity;
return (ambient + diffuse + specular);
}
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal){
// perform perspective divide
vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w;
//transform to NDC
projCoords = projCoords * 0.5 + 0.5;
//get closest depth from light's POV
float closestDepth = texture(shadowMap, projCoords.xy).r;
//get depth of current fragment
float currentDepth = projCoords.z;
//calculate bias
float bias = max(0.05 * (1.0 - dot(normal, lightDir)), 0.005);
//calculate shadow value
float shadow = currentDepth - bias > closestDepth ? 1.0 : 0.0;
if(projCoords.z > 1.0){
shadow = 0.0;
}
// shadow = currentDepth;
return shadow;
}
vec3 blendedTextureColor(vec2 texPos, vec4 tex1, vec4 tex2, vec4 tex3, vec4 tex4){
// int texIndex1 = int(groundTexIndex.x * 2);
// int texIndex2 = int(groundTexIndex.y * 2);
// int texIndex3 = int(groundTexIndex.z * 2);
// int texIndex4 = int(groundTexIndex.w * 2);
// vec4 tex1 = texture2D(groundTextures[int(groundTexIndex.x * 2)], texPos);
// vec4 tex2 = texture2D(groundTextures[int(groundTexIndex.y * 2)], texPos);
// vec4 tex3 = texture2D(groundTextures[int(groundTexIndex.z * 2)], texPos);
// vec4 tex4 = texture2D(groundTextures[int(groundTexIndex.w * 2)], texPos);
// float percentTex1 = (texPos.x - 1) * (texPos.y - 1);
// float percentTex2 = (texPos.x - 0) * (texPos.y - 1);
// float percentTex3 = (texPos.x - 1) * (texPos.y - 0);
// float percentTex4 = (texPos.x - 0) * (texPos.y - 0);
return mix(mix(tex1,tex2,texPos.x),mix(tex3,tex4,texPos.x),texPos.y).rgb;
}

View File

@ -0,0 +1,220 @@
#version 330 core
out vec4 FragColor;
struct Material {
sampler2D diffuse;
sampler2D specular;
float shininess;
};
struct DirLight {
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct PointLight {
vec3 position;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct SpotLight {
vec3 position;
vec3 direction;
float cutOff;
float outerCutOff;
float constant;
float linear;
float quadratic;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
#define NR_POINT_LIGHTS 10
in vec3 FragPos;
in vec3 Normal;
in vec2 TexCoord;
in vec4 FragPosLightSpace;
in ivec4 groundTexIndices;
uniform vec3 viewPos;
uniform DirLight dirLight;
uniform PointLight pointLights[NR_POINT_LIGHTS];
uniform SpotLight spotLight;
uniform Material material;
//texture stuff
// uniform sampler2D ourTexture;
uniform int hasTransparency;
// uniform sampler2D specularTexture;
//light depth map
uniform sampler2D shadowMap;
//textures
//
// Goal is to have a texture for the current chunk and one for each nearnby chunk
//
//
//
// uniform sampler2D groundTextures[10];
// function prototypes
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir);
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal);
vec3 blendedTextureColor(vec2 texPos, ivec4 groundTexIndex);
void main(){
if(hasTransparency == 1){
if(texture(material.diffuse, TexCoord).a < 0.1){
discard;
}
}
vec3 norm = normalize(Normal);
vec3 viewDir = normalize(viewPos - FragPos);
//get texture color
vec3 texColor = vec3(0,0,1);//blendedTextureColor(texPos, groundTexIndices);
vec3 result = CalcDirLight(dirLight, norm, viewDir);
//for(int i = 0; i < NR_POINT_LIGHTS; i++){
// result += CalcPointLight(pointLights[i], norm, FragPos, viewDir);
//}
//result += CalcSpotLight(spotLight, norm, FragPos, viewDir);
FragColor = vec4(result, texture(material.diffuse, TexCoord).a);
// FragColor = vec4(result, 1);//texture(ourTexture, TexCoord);//vec4(result, 1.0);
}
// calculates the color when using a directional light.
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir, vec3 texColor){
// //get texture color
// vec3 texColor = vec3(1,0,0);//blendedTextureColor(texPos, groundTexIndices);
//get light direction
vec3 lightDir = normalize(-light.direction);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// combine results
// vec3 texColor = texture(material.diffuse, TexCoord).rgb;
vec3 ambient = light.ambient;
vec3 diffuse = light.diffuse * diff;
//vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord).rgb);
float shadow = ShadowCalculation(FragPosLightSpace, lightDir, normal);
return ( ambient + (1.0-shadow) * diffuse ) * texColor;// + specular);
}
// calculates the color when using a point light.
vec3 CalcPointLight(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir){
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// combine results
vec3 ambient = light.ambient * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 diffuse = light.diffuse * diff * vec4(texture(material.diffuse, TexCoord)).xyz;
vec3 specular = light.specular * spec * vec4(texture(material.specular, TexCoord)).xyz;
ambient *= attenuation;
diffuse *= attenuation;
specular *= attenuation;
return (ambient + diffuse + specular);
}
// calculates the color when using a spot light.
vec3 CalcSpotLight(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir)
{
vec3 lightDir = normalize(light.position - fragPos);
// diffuse shading
float diff = max(dot(normal, lightDir), 0.0);
// specular shading
vec3 reflectDir = reflect(-lightDir, normal);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.shininess);
// attenuation
float distance = length(light.position - fragPos);
float attenuation = 1.0 / (light.constant + light.linear * distance + light.quadratic * (distance * distance));
// spotlight intensity
float theta = dot(lightDir, normalize(-light.direction));
float epsilon = light.cutOff - light.outerCutOff;
float intensity = clamp((theta - light.outerCutOff) / epsilon, 0.0, 1.0);
// combine results
vec3 ambient = light.ambient * vec3(texture(material.diffuse, TexCoord));
vec3 diffuse = light.diffuse * diff * vec3(texture(material.diffuse, TexCoord));
vec3 specular = light.specular * spec * vec3(texture(material.specular, TexCoord));
ambient *= attenuation * intensity;
diffuse *= attenuation * intensity;
specular *= attenuation * intensity;
return (ambient + diffuse + specular);
}
float ShadowCalculation(vec4 fragPosLightSpace, vec3 lightDir, vec3 normal){
// perform perspective divide
vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w;
//transform to NDC
projCoords = projCoords * 0.5 + 0.5;
//get closest depth from light's POV
float closestDepth = texture(shadowMap, projCoords.xy).r;
//get depth of current fragment
float currentDepth = projCoords.z;
//calculate bias
float bias = max(0.05 * (1.0 - dot(normal, lightDir)), 0.005);
//calculate shadow value
float shadow = currentDepth - bias > closestDepth ? 1.0 : 0.0;
if(projCoords.z > 1.0){
shadow = 0.0;
}
// shadow = currentDepth;
return shadow;
}
// vec3 blendedTextureColor(vec2 texPos, ivec4 groundTexIndex){
// vec4 tex1 = texture2D(groundTextures[groundTexIndex.x * 2], texPos);
// vec4 tex2 = texture2D(groundTextures[groundTexIndex.y * 2], texPos);
// vec4 tex3 = texture2D(groundTextures[groundTexIndex.z * 2], texPos);
// vec4 tex4 = texture2D(groundTextures[groundTexIndex.w * 2], texPos);
// // float percentTex1 = (texPos.x - 1) * (texPos.y - 1);
// // float percentTex2 = (texPos.x - 0) * (texPos.y - 1);
// // float percentTex3 = (texPos.x - 1) * (texPos.y - 0);
// // float percentTex4 = (texPos.x - 0) * (texPos.y - 0);
// return mix(mix(tex1,tex2,texPos.x),mix(tex3,tex4,texPos.x),texPos.y).rgb;
// }

View File

@ -0,0 +1,54 @@
//Vertex Shader
#version 410 core
//input buffers
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 4) in vec2 aTex;
layout (location = 5) in vec4 aGroundTexIndices;
//coordinate space transformation matrices
uniform mat4 transform;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 lightSpaceMatrix;
//output buffers
out vec3 Normal;
out vec3 FragPos;
out vec2 TexCoord;
out vec4 FragPosLightSpace;
flat out ivec4 groundTexIndices;
void main() {
//normalize posiiton and normal
vec4 FinalVertex = vec4(aPos, 1.0);
vec4 FinalNormal = vec4(aNormal, 1.0);
//push frag, normal, and texture positions to fragment shader
FragPos = vec3(model * FinalVertex);
Normal = mat3(transpose(inverse(model))) * aNormal;
TexCoord = aTex;
//push texure indices to fragment shader
groundTexIndices = ivec4(int(aGroundTexIndices.x),int(aGroundTexIndices.y),int(aGroundTexIndices.z),int(aGroundTexIndices.w));
// groundTexIndices = vec4(int(aGroundTexIndices.x),int(aGroundTexIndices.y),int(aGroundTexIndices.z),int(aGroundTexIndices.w));
// groundTexIndices = ivec4(0,1,2,3);
//shadow map stuff
FragPosLightSpace = lightSpaceMatrix * vec4(FragPos, 1.0);
//set final position with opengl space
gl_Position = projection * view * model * FinalVertex;
}

BIN
assets/Textures/Branch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 KiB

View File

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -0,0 +1,294 @@
{
"imageWidth": 256,
"imageHeight": 256,
"glyphs": [
{
"symbol": "A",
"startX": 31,
"startY": 111,
"width": 12,
"height": 14
},
{
"symbol": "B",
"startX": 65,
"startY": 111,
"width": 10,
"height": 14
},
{
"symbol": "C",
"startX": 96,
"startY": 111,
"width": 10,
"height": 14
},
{
"symbol": "D",
"startX": 128,
"startY": 111,
"width": 11,
"height": 14
},
{
"symbol": "E",
"startX": 159,
"startY": 111,
"width": 10,
"height": 14
},
{
"symbol": "F",
"startX": 192,
"startY": 111,
"width": 10,
"height": 14
},
{
"symbol": "G",
"startX": 224,
"startY": 111,
"width": 12,
"height": 13
},
{
"symbol": "O",
"startX": 224,
"startY": 79,
"width": 12,
"height": 14
},
{
"symbol": "N",
"startX": 192,
"startY": 79,
"width": 11,
"height": 14
},
{
"symbol": "M",
"startX": 161,
"startY": 79,
"width": 12,
"height": 14
},
{
"symbol": "L",
"startX": 129,
"startY": 79,
"width": 9,
"height": 14
},
{
"symbol": "K",
"startX": 95,
"startY": 79,
"width": 11,
"height": 13
},
{
"symbol": "J",
"startX": 60,
"startY": 76,
"width": 11,
"height": 16
},
{
"symbol": "I",
"startX": 30,
"startY": 78,
"width": 9,
"height": 14
},
{
"symbol": "H",
"startX": 0,
"startY": 79,
"width": 11,
"height": 13
},
{
"symbol": "W",
"startX": 223,
"startY": 48,
"width": 16,
"height": 12
},
{
"symbol": "X",
"startX": 0,
"startY": 16,
"width": 9,
"height": 11
},
{
"symbol": "V",
"startX": 191,
"startY": 48,
"width": 11,
"height": 12
},
{
"symbol": "U",
"startX": 160,
"startY": 48,
"width": 11,
"height": 12
},
{
"symbol": "T",
"startX": 127,
"startY": 48,
"width": 10,
"height": 12
},
{
"symbol": "S",
"startX": 96,
"startY": 48,
"width": 8,
"height": 13
},
{
"symbol": "R",
"startX": 64,
"startY": 48,
"width": 9,
"height": 13
},
{
"symbol": "Q",
"startX": 32,
"startY": 46,
"width": 12,
"height": 15
},
{
"symbol": "P",
"startX": 0,
"startY": 48,
"width": 9,
"height": 13
},
{
"symbol": "X",
"startX": 0,
"startY": 16,
"width": 10,
"height": 12
},
{
"symbol": "Y",
"startX": 31,
"startY": 16,
"width": 10,
"height": 12
},
{
"symbol": "Z",
"startX": 64,
"startY": 16,
"width": 10,
"height": 12
},
{
"symbol": "[",
"startX": 97,
"startY": 14,
"width": 4,
"height": 13
},
{
"symbol": "\\",
"startX": 128,
"startY": 16,
"width": 6,
"height": 11
},
{
"symbol": " ",
"startX": 0,
"startY": 240,
"width": 16,
"height": 16
},
{
"symbol": "0",
"startX": 0,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "1",
"startX": 32,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "2",
"startX": 64,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "3",
"startX": 96,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "4",
"startX": 128,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "5",
"startX": 160,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "6",
"startX": 192,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "7",
"startX": 224,
"startY": 175,
"width": 10,
"height": 14
},
{
"symbol": "8",
"startX": 0,
"startY": 143,
"width": 11,
"height": 14
},
{
"symbol": "9",
"startX": 31,
"startY": 143,
"width": 11,
"height": 14
},
{
"symbol": ".",
"startX": 190,
"startY": 205,
"width": 11,
"height": 14
}
]
}

View File

@ -0,0 +1,483 @@
{
"imageWidth": 3864,
"imageHeight": 42,
"glyphs":
[
{
"symbol": "A",
"startX": 1,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "B",
"startX": 43,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "C",
"startX": 85,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "D",
"startX": 127,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "E",
"startX": 169,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "F",
"startX": 211,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "G",
"startX": 253,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "H",
"startX": 295,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "I",
"startX": 337,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "J",
"startX": 379,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "K",
"startX": 421,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "L",
"startX": 463,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "M",
"startX": 505,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "N",
"startX": 547,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "O",
"startX": 589,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "P",
"startX": 631,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "Q",
"startX": 673,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "R",
"startX": 715,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "S",
"startX": 757,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "T",
"startX": 799,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "U",
"startX": 841,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "V",
"startX": 883,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "W",
"startX": 925,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "X",
"startX": 967,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "Y",
"startX": 1009,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "Z",
"startX": 1051,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "a",
"startX": 1093,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "b",
"startX": 1135,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "c",
"startX": 1177,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "d",
"startX": 1219,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "e",
"startX": 1261,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "f",
"startX": 1303,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "g",
"startX": 1345,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "h",
"startX": 1387,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "i",
"startX": 1429,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "j",
"startX": 1471,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "k",
"startX": 1513,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "l",
"startX": 1555,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "m",
"startX": 1597,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "n",
"startX": 1639,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "o",
"startX": 1681,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "p",
"startX": 1723,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "q",
"startX": 1765,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "r",
"startX": 1807,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "s",
"startX": 1849,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "t",
"startX": 1891,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "u",
"startX": 1933,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "v",
"startX": 1975,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "w",
"startX": 2017,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "x",
"startX": 2059,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "y",
"startX": 2101,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "z",
"startX": 2143,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "1",
"startX": 2185,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "2",
"startX": 2227,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "3",
"startX": 2269,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "4",
"startX": 2311,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "5",
"startX": 2353,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "6",
"startX": 2395,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "7",
"startX": 2437,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "8",
"startX": 2479,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "9",
"startX": 2521,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "0",
"startX": 2563,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": ".",
"startX": 2605,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "!",
"startX": 2647,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "?",
"startX": 2689,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "\"",
"startX": 2731,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": "'",
"startX": 2773,
"startY": 1,
"width": 40,
"height": 40
},
{
"symbol": ",",
"startX": 2815,
"startY": 1,
"width": 40,
"height": 40
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,3 @@
"oxygen mono" from https://www.fontsquirrel.com/fonts/oxygen-mono
rendered to bitmap with https://github.com/andryblack/fontbuilder

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 KiB

BIN
assets/Textures/b1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

BIN
assets/Textures/deer1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

Before

Width:  |  Height:  |  Size: 967 B

After

Width:  |  Height:  |  Size: 967 B

View File

Before

Width:  |  Height:  |  Size: 967 B

After

Width:  |  Height:  |  Size: 967 B

View File

@ -0,0 +1,118 @@
{
"texture_map": {
"Models/plane.fbx": {
"Cube": [
"/Textures/Ground/Dirt1.png",
"/Textures/Ground/Dirt1.png"
]
},
"Models/arcdock5deg1notex.fbx": {
"Cube": [
"/Textures/w1.png",
"/Textures/w1.png"
]
},
"Models/wheat1.fbx": {
"Cube": [
"/Textures/wheat1.png",
"/Textures/wheat1.png"
]
},
"Models/wheat2.fbx": {
"Wheat": [
"/Textures/wheat2.png",
"/Textures/wheat2.png"
]
},
"Models/unitsphere.fbx": {
"Sphere": [
"/Textures/transparent_blue.png",
"/Textures/transparent_blue.png"
]
},
"Models/unitsphere_1.fbx": {
"Sphere": [
"/Textures/transparent_red.png",
"/Textures/transparent_red.png"
]
},
"Models/unitsphere_grey.fbx": {
"Sphere": [
"/Textures/transparent_grey.png",
"/Textures/transparent_grey.png"
]
},
"Models/katana1alt.fbx": {
"Cube.001": [
"/Textures/katana1.png",
"/Textures/katana1.png"
]
},
"Models/tree1.fbx": {
"Cube.002": [
"/Textures/Branch.png",
"/Textures/Branch.png"
],
"Cylinder": [
"/Textures/Branch.png",
"/Textures/Branch.png"
]
},
"Models/goblin1.fbx" : {
"makehuman1" : [
"/Textures/GoblinSkin.png",
"/Textures/GoblinSkin.png"
],
"high-poly" : [
"/Textures/GoblinEyes.png",
"/Textures/GoblinEyes.png"
]
},
"Models/person1animpass2.fbx" : {
"makehuman1" : [
"/Textures/skin1.png",
"/Textures/skin1.png"
],
"high-poly" : [
"/Textures/w1.png",
"/Textures/w1.png"
]
},
"Models/building1.fbx" : {
"Cube.001" : [
"/Textures/building_diffuse.png",
"/Textures/building_diffuse.png"
]
},
"Models/unitcylinder.fbx" : {
"Cylinder" : [
"/Textures/transparent_blue.png",
"/Textures/transparent_blue.png"
]
},
"Models/unitplane.fbx" : {
"Plane" : [
"/Textures/transparent_blue.png",
"/Textures/transparent_blue.png"
]
},
"Models/unitcube.fbx" : {
"Cube" : [
"/Textures/transparent_blue.png",
"/Textures/transparent_blue.png"
]
},
"Models/falloak1.fbx" : {
"Cube" : [
"/Textures/falloak1.png",
"/Textures/falloak1.png"
]
},
"Models/deer1.fbx" : {
"Cube.001" : [
"/Textures/deer1.png",
"/Textures/deer1.png"
]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
assets/Textures/katana1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

BIN
assets/Textures/skin1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
assets/Textures/spark1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Some files were not shown because too many files have changed in this diff Show More