@xort/cga 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/three.d.cts CHANGED
@@ -117,6 +117,9 @@ declare const DiamondShader: {
117
117
  vertexShader: string;
118
118
  fragmentShader: string;
119
119
  uniforms: {
120
+ invModelMatrix: {
121
+ value: three.Matrix4;
122
+ };
120
123
  tCubeMapNormals: {
121
124
  type: string;
122
125
  value: null;
package/dist/three.d.ts CHANGED
@@ -117,6 +117,9 @@ declare const DiamondShader: {
117
117
  vertexShader: string;
118
118
  fragmentShader: string;
119
119
  uniforms: {
120
+ invModelMatrix: {
121
+ value: three.Matrix4;
122
+ };
120
123
  tCubeMapNormals: {
121
124
  type: string;
122
125
  value: null;
package/dist/three.js CHANGED
@@ -468,7 +468,7 @@ var DiamondShader = {
468
468
  "// Reflect/Refract ray entering the diamond",
469
469
  "const float n1 = 1.0;",
470
470
  "const float epsilon = 1e-4;",
471
- "float f0 = (2.4- n1)/(2.4 + n1);",
471
+ "float f0 = (n2- n1)/(n2 + n1);",
472
472
  "f0 *= f0;",
473
473
  "vec3 attenuationFactor = vec3(1.0);",
474
474
  "vec3 newDirection = refract(direction, normal, n1/n2);",
@@ -546,6 +546,7 @@ var DiamondShader = {
546
546
  "}"
547
547
  ].join("\n"),
548
548
  uniforms: {
549
+ invModelMatrix: { value: new THREE.Matrix4() },
549
550
  tCubeMapNormals: {
550
551
  type: "t",
551
552
  value: null