Skip to content

Commit

Permalink
Merge pull request #697 from adithyaakrishna/feat/types-webgl-shaders
Browse files Browse the repository at this point in the history
Updated Types For WebGL Shaders
  • Loading branch information
dkoes authored Jul 11, 2023
2 parents b09aaf6 + e2533a0 commit 955a12d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/WebGL/shaders/lib/instanced/uniforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export const uniforms = {
fogColor: { type: 'c', value: new Color(1.0, 1.0, 1.0) },
fogNear: { type: 'f', value: 1.0 },
fogFar: { type: 'f', value: 2000},
directionalLightColor: { type: 'fv', value: [] },
directionalLightDirection: { type: 'fv', value: [] }
}
directionalLightColor: { type: 'fv', value: [] as number[] },
directionalLightDirection: { type: 'fv', value: [] as number[] }
}
6 changes: 3 additions & 3 deletions src/WebGL/shaders/lib/lambertdouble/uniforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export const uniforms = {
fogColor: { type: 'c', value: new Color(1.0, 1.0, 1.0) },
fogNear: { type: 'f', value: 1.0 },
fogFar: { type: 'f', value: 2000},
directionalLightColor: { type: 'fv', value: [] },
directionalLightDirection: { type: 'fv', value: [] }
}
directionalLightColor: { type: 'fv', value: [] as number[] },
directionalLightDirection: { type: 'fv', value: [] as number[] }
}
6 changes: 3 additions & 3 deletions src/WebGL/shaders/lib/sphereimposter/uniforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export const uniforms = {
fogColor: { type: 'c', value: new Color(1.0, 1.0, 1.0) },
fogNear: { type: 'f', value: 1.0 },
fogFar: { type: 'f', value: 2000},
directionalLightColor: { type: 'fv', value: [] },
directionalLightDirection: { type: 'fv', value: [] }
}
directionalLightColor: { type: 'fv', value: [] as number[] },
directionalLightDirection: { type: 'fv', value: [] as number[] }
}
6 changes: 3 additions & 3 deletions src/WebGL/shaders/lib/stickimposter/uniforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export const uniforms = {
fogColor: { type: 'c', value: new Color(1.0, 1.0, 1.0) },
fogNear: { type: 'f', value: 1.0 },
fogFar: { type: 'f', value: 2000},
directionalLightColor: { type: 'fv', value: [] },
directionalLightDirection: { type: 'fv', value: [] }
}
directionalLightColor: { type: 'fv', value: [] as number[] },
directionalLightDirection: { type: 'fv', value: [] as number[] }
}
8 changes: 4 additions & 4 deletions src/WebGL/shaders/lib/volumetric/uniforms.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Matrix4 } from "WebGL/math";
import { Color } from "../../../../colors";

export const uniforms = {
Expand All @@ -11,9 +12,8 @@ export const uniforms = {
step: { type: 'f', value: 1.0 }, //length of a step
maxdepth: {type: 'f',value: 100.0}, //how far to step along ray before stopping
subsamples: { type: 'f', value: 5.0}, //how many substeps to take
textmat: { type: 'mat4', value: []},
projinv: { type: 'mat4', value: []},
textmat: { type: 'mat4', value: [] as Matrix4[] },
projinv: { type: 'mat4', value: [] as Matrix4[] },
transfermin: {type: 'f', value: -0.2 },
transfermax: {type: 'f', value: 0.2},

}
}

0 comments on commit 955a12d

Please sign in to comment.