Skip to content

Commit 9be02ca

Browse files
Olli Etuahophemavax
authored andcommitted
Clean up unused uniforms and matrices from aquarium
1 parent 999393d commit 9be02ca

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

aquarium-vr/aquarium-vr.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,6 @@ function initialize() {
934934
var viewProjection = new Float32Array(16);
935935
var worldViewProjection = new Float32Array(16);
936936
var viewInverse = new Float32Array(16);
937-
var viewProjectionInverse = new Float32Array(16);
938937
var skyView = new Float32Array(16);
939938
var skyViewProjection = new Float32Array(16);
940939
var skyViewProjectionInverse = new Float32Array(16);
@@ -958,20 +957,6 @@ function initialize() {
958957
var skyConst = {viewProjectionInverse: skyViewProjectionInverse};
959958
var skyPer = {};
960959

961-
// Sand uniforms.
962-
var sandConst = {
963-
viewInverse: viewInverse,
964-
lightWorldPos: lightWorldPos,
965-
lightColor: one4,
966-
specular: one4,
967-
shininess: 5,
968-
specularFactor: 0.3};
969-
var sandPer = {
970-
world: world,
971-
worldViewProjection: worldViewProjection,
972-
worldInverse: worldInverse,
973-
worldInverseTranspose: worldInverseTranspose};
974-
975960
// Generic uniforms.
976961
var genericConst = {
977962
viewInverse: viewInverse,
@@ -1302,10 +1287,6 @@ function initialize() {
13021287
target,
13031288
up);
13041289
}
1305-
var uiMatrix = new Float32Array(16);
1306-
//calculateViewMatrix(uiMatrix, pose.orientation, [0, 0, 10]);
1307-
//g_ui.render(projection, fast.matrix4.inverse(uiMatrix, fast.matrix4.translation(uiMatrix, [0, 0, 6])));
1308-
//var uiMatrix = new Float32Array(16);
13091290
if (g.net.slave) {
13101291
// compute X fov from y fov
13111292
var fovy = math.degToRad(g.globals.fieldOfView * g.net.fovFudge);
@@ -1317,8 +1298,6 @@ function initialize() {
13171298
}
13181299
fast.matrix4.inverse(view, viewInverse);
13191300
fast.matrix4.mul(viewProjection, view, projection);
1320-
fast.matrix4.inverse(viewProjectionInverse, viewProjection);
1321-
//g_ui.render(projection, fast.matrix4.inverse(uiMatrix, fast.matrix4.translation(uiMatrix, [0, 0, 16])));
13221301

13231302
fast.matrix4.copy(skyView, view);
13241303
skyView[12] = 0;

aquarium/aquarium.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,6 @@ function initialize() {
10571057
var viewProjection = new Float32Array(16);
10581058
var worldViewProjection = new Float32Array(16);
10591059
var viewInverse = new Float32Array(16);
1060-
var viewProjectionInverse = new Float32Array(16);
10611060
var skyView = new Float32Array(16);
10621061
var skyViewProjection = new Float32Array(16);
10631062
var skyViewProjectionInverse = new Float32Array(16);
@@ -1081,20 +1080,6 @@ function initialize() {
10811080
var skyConst = {viewProjectionInverse: skyViewProjectionInverse};
10821081
var skyPer = {};
10831082

1084-
// Sand uniforms.
1085-
var sandConst = {
1086-
viewInverse: viewInverse,
1087-
lightWorldPos: lightWorldPos,
1088-
lightColor: one4,
1089-
specular: one4,
1090-
shininess: 5,
1091-
specularFactor: 0.3};
1092-
var sandPer = {
1093-
world: world,
1094-
worldViewProjection: worldViewProjection,
1095-
worldInverse: worldInverse,
1096-
worldInverseTranspose: worldInverseTranspose};
1097-
10981083
// Generic uniforms.
10991084
var genericConst = {
11001085
viewInverse: viewInverse,
@@ -1426,7 +1411,6 @@ function initialize() {
14261411
}
14271412
fast.matrix4.inverse(view, viewInverse);
14281413
fast.matrix4.mul(viewProjection, view, projection);
1429-
fast.matrix4.inverse(viewProjectionInverse, viewProjection);
14301414

14311415
fast.matrix4.copy(skyView, view);
14321416
skyView[12] = 0;

0 commit comments

Comments
 (0)