Skip to content

Commit 3337c7f

Browse files
authored
Merge pull request #687 from satelllte/sample_aperture
DOF: Reuse "sampleAperture" function
2 parents cf75147 + e7fbd50 commit 3337c7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/materials/pathtracing/glsl/camera_util_functions.glsl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const camera_util_functions = /* glsl */`
6060
vec3 shapeUVW= rand3( 1 );
6161
int blades = physicalCamera.apertureBlades;
6262
float anamorphicRatio = physicalCamera.anamorphicRatio;
63-
vec2 apertureSample = blades == 0 ? sampleCircle( shapeUVW.xy ) : sampleRegularPolygon( blades, shapeUVW );
63+
vec2 apertureSample = sampleAperture( blades, shapeUVW );
6464
apertureSample *= physicalCamera.bokehSize * 0.5 * 1e-3;
6565
6666
// rotate the aperture shape

0 commit comments

Comments
 (0)