const float PI = 3.1415926535897932384626433832795;
const float PI_2 = 1.57079632679489661923;
const float PI_4 = 0.785398163397448309616;
float PHI = (1.0+sqrtf(5.0))/2.0;
cam.setPosition( cam.getPosition()+(targetPos-cam.getPosition())*0.01 );
cam.lookAt(targetPos);
In PIX, Select Target Process => Launch Win32 and set the following 2 entries according to where Canary / Chrome is installed:
- Path to executable: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application\chrome.exe"
- Working directory: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application"
- Command line arguments: --disable-gpu-sandbox --disable-direct-composition
- You can add those arguments if you want to be able to see the disassembled shader code: --enable-dawn-features=emit_hlsl_debug_symbols,disable_symbol_renaming
- Launch Suspended unchecked, Launch for GPU capture and Force D3D11On12 checked
Then click on "Launch".
Important: you should close all your Canary / Chrome windows/processes before clicking on the "Launch" button!
This file contains 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
<html> | |
<head> | |
<style> | |
body { | |
margin: 0; | |
padding: 10px; | |
color: #ffffff; | |
background: #222222; | |
font-family: sans-serif; | |
font-size: 7px; |
This file contains 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 a faux sphere in screen space, determine the arc transform to orbit | |
* the camera around a target position. A continuous orientation will | |
* be provided for further calls. | |
*/ | |
function arcBallTransform( | |
scrSize, // Screen size, vec2 | |
scrPos0, // Starting mouse position, vec2 | |
scrPos1, // Ending Mouse Positiong, vec2 | |
rotOrientation, // Current arc orientation, quaternion | |
targetPos, // Position to orbit around |
This file contains 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
// Copyright (c) 2023 Tomasz Stachowiak | |
// | |
// This contribution is dual licensed under EITHER OF | |
// | |
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0) | |
// MIT license (http://opensource.org/licenses/MIT) | |
// | |
// at your option. | |
#include "/inc/frame_constants.hlsl" |
This file contains 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
import time | |
import math | |
import torch | |
import taichi as ti | |
import taichi.math as tm | |
import tinytex as ttex | |
from tinycio import fsio |
This file contains 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
// each pixel is assigned 4 random u32 values per frame | |
@group(0) @binding(1) | |
var<storage, read> rnd_state: array<u32>; | |
// the current state within this pixel | |
var<private> local_rnd_state:vec4u; | |
fn random_u32(state:ptr<private,vec4u>) -> u32 { | |
var st:vec4u = *state; | |
/* Algorithm "xor128" from p. 5 of Marsaglia, "Xorshift RNGs" */ |