|
1 | 1 | struct Uniforms { |
2 | | - viewProjectionMatrix: mat4x4<f32>, |
| 2 | + viewProjectionMatrix: mat4x4f, |
3 | 3 | } |
4 | 4 |
|
5 | 5 | @group(0) @binding(0) var<uniform> uniforms: Uniforms; |
@@ -169,15 +169,15 @@ fn evalLambertian(hit: Intersection, wi: vec3f) -> vec3f { |
169 | 169 | return albedo * FRAC_1_PI * max(EPSILON, dot(hit.n, wi)); |
170 | 170 | } |
171 | 171 |
|
172 | | -fn pixarOnb(n: vec3<f32>) -> mat3x3<f32> { |
| 172 | +fn pixarOnb(n: vec3f) -> mat3x3f { |
173 | 173 | // https://www.jcgt.org/published/0006/01/01/paper-lowres.pdf |
174 | 174 | let s = select(-1f, 1f, n.z >= 0f); |
175 | 175 | let a = -1f / (s + n.z); |
176 | 176 | let b = n.x * n.y * a; |
177 | | - let u = vec3<f32>(1f + s * n.x * n.x * a, s * b, -s * n.x); |
178 | | - let v = vec3<f32>(b, s + n.y * n.y * a, -n.y); |
| 177 | + let u = vec3(1f + s * n.x * n.x * a, s * b, -s * n.x); |
| 178 | + let v = vec3(b, s + n.y * n.y * a, -n.y); |
179 | 179 |
|
180 | | - return mat3x3<f32>(u, v, n); |
| 180 | + return mat3x3(u, v, n); |
181 | 181 | } |
182 | 182 |
|
183 | 183 | fn rayIntersectBvh(ray: Ray, rayTMax: f32, hit: ptr<function, Intersection>) -> bool { |
@@ -352,7 +352,7 @@ fn textureLookup(desc: TextureDescriptor, uv: vec2f) -> vec3f { |
352 | 352 | } |
353 | 353 |
|
354 | 354 | @must_use |
355 | | -fn rngNextInUnitHemisphere(state: ptr<function, u32>) -> vec3<f32> { |
| 355 | +fn rngNextInUnitHemisphere(state: ptr<function, u32>) -> vec3f { |
356 | 356 | let r1 = rngNextFloat(state); |
357 | 357 | let r2 = rngNextFloat(state); |
358 | 358 |
|
|
0 commit comments