ferminLR / webgpu-path-tracing

Path tracing with WebGPU compute shaders
https://iamferm.in/webgpu-path-tracing
30 stars 2 forks source link

Where is function reflect()? #1

Closed Nabla-GIT closed 6 months ago

Nabla-GIT commented 6 months ago

Hi,ferminLR,

you did a great job with your Path tracing project!

I'm learning your code,and I cant find the function of reflect() in the file of compute.js

where you defined it?

ferminLR commented 6 months ago

Hi @Nabla-GIT, and thanks for your words! :)

The reflect() function is part of the WGSL language, so I did't have to define it.

Here you have a link to the docs: https://www.w3.org/TR/WGSL/#reflect-builtin