Working with lights and shadows

This commit is contained in:
Vladislav Khorev committed 2026-06-04 16:35:01 +03:00
1 parent e3542b59f7
commit ed8d6f2e92
8 files changed
+32 -6

No files matched your search

@@ -406,6 +406,7 @@
"name": "Room_Cover_Bath_W_N_2_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_North_West_1_Bath_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -419,6 +420,7 @@
"name": "Room_Cover_LivingRoom_W_N_2_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_North_West_1_RoomB_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -432,6 +434,7 @@
"name": "Room_Cover_LivingRoom_W_S_2_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_South_West_1_RoomB_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -445,6 +448,7 @@
"name": "Room_Cover_Main_Hall_And_Corridors_002",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_Main_Hall_Corridor_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -458,6 +462,7 @@
"name": "Room_Cover_Others_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_All_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -471,6 +476,7 @@
"name": "Room_Cover_Utility_W_N_3_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_North_West_2_Utility_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -484,6 +490,7 @@
"name": "Room_Cover_Utility_W_S_3_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/dorm2/Room_Cover_South_West_2_Utility_001.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -307,6 +307,7 @@
"name": "Room_Cover_Corridor_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_Corridor_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -323,6 +324,7 @@
"name": "Room_Cover_Main_Hall_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_Main_Hall_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -339,6 +341,7 @@
"name": "Room_Cover_North_1_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_North_1_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -355,6 +358,7 @@
"name": "Room_Cover_South_1_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_South_1_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -371,6 +375,7 @@
"name": "Room_Cover_North_2_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_North_2_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -387,6 +392,7 @@
"name": "Room_Cover_South_2_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_South_2_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -403,6 +409,7 @@
"name": "Room_Cover_North_3_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_North_3_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -419,6 +426,7 @@
"name": "Room_Cover_South_3_001",
"texturePath": "resources/black.png",
"meshPath": "resources/w/interior/Room_Cover_South_3_002.txt",
"castShadowNight" : false,
"rotationX": 0.0,
"rotationY": 0.0,
"rotationZ": 0.0,
@@ -53,8 +53,8 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.4;
float diffuseStrength = 0.6;
float ambient = 0.75;
float diffuseStrength = 0.25;
// Compute diffuse term; if normals are missing (zero-length) treat as fully lit
float diffuse = 1.0;
+2 -2
View File
@@ -53,8 +53,8 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.4;
float diffuseStrength = 0.6;
float ambient = 0.75;
float diffuseStrength = 0.25;
float diffuse = 1.0;
vec3 n = fragNormal;