three-gpu-pathtracer 0.0.22 → 0.0.24
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/README.md +6 -4
- package/build/index.module.js +465 -57
- package/build/index.module.js.map +1 -1
- package/build/index.umd.cjs +464 -56
- package/build/index.umd.cjs.map +1 -1
- package/package.json +13 -13
- package/src/core/PathTracingRenderer.js +48 -1
- package/src/core/PathTracingSceneGenerator.js +21 -2
- package/src/core/WebGLPathTracer.js +68 -13
- package/src/core/utils/BakedGeometry.js +23 -0
- package/src/core/utils/BufferAttributeUtils.js +11 -3
- package/src/core/utils/MeshDiff.js +6 -13
- package/src/core/utils/StaticGeometryGenerator.js +18 -3
- package/src/core/utils/mergeGeometries.js +14 -1
- package/src/index.d.ts +2 -1
- package/src/materials/MaterialBase.js +11 -0
- package/src/materials/pathtracing/PhysicalPathTracingMaterial.js +2 -1
- package/src/materials/pathtracing/glsl/attenuate_hit_function.glsl.js +2 -1
- package/src/materials/pathtracing/glsl/camera_util_functions.glsl.js +1 -1
- package/src/materials/pathtracing/glsl/get_surface_record_function.glsl.js +2 -1
- package/src/materials/surface/AmbientOcclusionMaterial.js +2 -0
- package/src/shader/bvh/inside_fog_volume_function.glsl.js +1 -1
- package/src/shader/structs/material_struct.glsl.js +3 -1
- package/src/uniforms/MaterialsTexture.js +4 -1
- package/src/uniforms/StratifiedSamplesTexture.js +55 -3
- package/src/uniforms/stratified/StratifiedSampler.js +19 -7
- package/src/uniforms/stratified/StratifiedSamplerCombined.js +14 -4
- package/src/utils/CubeToEquirectGenerator.js +159 -0
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ _More features and capabilities in progress!_
|
|
|
14
14
|
|
|
15
15
|
# Examples
|
|
16
16
|
|
|
17
|
+
[GLB Drag and Drop Viewer](https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/viewer.html)
|
|
18
|
+
|
|
17
19
|
**Setup**
|
|
18
20
|
|
|
19
21
|
[Basic glTF Setup Example](https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/basic.html)
|
|
@@ -26,7 +28,7 @@ _More features and capabilities in progress!_
|
|
|
26
28
|
|
|
27
29
|
[Lego Models](https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/lego.html)
|
|
28
30
|
|
|
29
|
-
[Interior Scene](https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/interior.html)
|
|
31
|
+
[Interior Scene w/ Equirect Rendering](https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/interior.html)
|
|
30
32
|
|
|
31
33
|
[Depth of Field](https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/depthOfField.html)
|
|
32
34
|
|
|
@@ -107,7 +109,7 @@ import { BlurredEnvMapGenerator } from 'three-gpu-pathtracer';
|
|
|
107
109
|
|
|
108
110
|
// ...
|
|
109
111
|
|
|
110
|
-
const envMap = await new
|
|
112
|
+
const envMap = await new HDRLoader().setDataType( THREE.FloatType ).loadAsync( envMapUrl );
|
|
111
113
|
const generator = new BlurredEnvMapGenerator( renderer );
|
|
112
114
|
const blurredEnvMap = generator.generate( envMap, 0.35 );
|
|
113
115
|
|
|
@@ -133,10 +135,10 @@ bounces = 10 : Number
|
|
|
133
135
|
|
|
134
136
|
Max number of lights bounces to trace.
|
|
135
137
|
|
|
136
|
-
### .
|
|
138
|
+
### .filterGlossyFactor
|
|
137
139
|
|
|
138
140
|
```js
|
|
139
|
-
|
|
141
|
+
filterGlossyFactor = 0 : Number
|
|
140
142
|
```
|
|
141
143
|
|
|
142
144
|
Factor for alleviating bright pixels from rays that hit diffuse surfaces then specular surfaces. Setting this higher alleviates fireflies but will remove some specular caustics.
|