This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vec3 sundir; | |
| vec3 I_R, I_M; | |
| vec2 totalDepthRM; | |
| // consts | |
| const vec3 rayScatterCoeff = vec3(58e-7, 135e-7, 331e-7); | |
| const vec3 rayEffectiveCoeff = rayScatterCoeff; // Rayleight doesn't absorb light | |
| const vec3 mieScatterCoeff = vec3(2e-5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Makie | |
| using AbstractPlotting | |
| scene = Scene() | |
| scene = mesh(Sphere(Point3f0(0), 0.9f0), transparency=true, alpha=0.05) | |
| function cosine_weighted_sample_hemisphere() | |
| r1 = rand() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let DirEntry = | |
| React.FunctionComponent.Of | |
| ((fun name -> | |
| let hidden = Hooks.useState false | |
| let img = | |
| img [ Src <| Utils.getStatic "icons/directory.svg" ] | |
| let mutable className = "directory" | |
| if hidden.current then className <- className + " hidden" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // old version | |
| customElements.define("monaco-editor", class extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this._editorValue = "loading..." | |
| } | |
| set _editorValue(value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function automate(selector, interval) { | |
| let id; | |
| let on = () => { | |
| if (id) { | |
| console.log(selector + " already automated") | |
| return; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Copper Plate, 1024 | |
| Aluminium Plate, 1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::fmt::Debug; | |
| /// # Partial Result | |
| /// | |
| /// Result type for operations which can fail, but still return some data | |
| /// | |
| /// Conceptionally, this is a (D, Option<E>) | |
| /// | |
| /// The design of this type is intended to force handling of errors, but also | |
| /// grant access to partial results in case of errors |
OlderNewer