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
// This works (compiled with: fxc /T ps_5_0 /E main foo.hlsl) | |
float main (in uint x:X) : SV_Target0 | |
{ | |
float a[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; | |
// Put some things in the array | |
a[x] = 47.0; | |
a[x&7] = 42.0; | |
a[(x+1)%12] = 3.14159; |
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
# Sierpinski carpet generator, in Python using Numpy and Pillow. | |
# Written by Nathan Reed, June 2014. | |
# This code is released into the public domain. | |
import numpy as np | |
from PIL import Image | |
numLevels = 6 | |
imageSize = 3**numLevels |
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
float beckmann1(float m : M, float NdotH : NDOTH) : SV_Target0 | |
{ | |
float oneOverMSquared = 1.0 / (m*m); | |
float NdotHSquared = NdotH * NdotH; | |
return exp((NdotHSquared - 1.0) / NdotHSquared * oneOverMSquared) * oneOverMSquared * (1.0 / 3.141592654) / (NdotHSquared * NdotHSquared); | |
} | |
mad r0.x, v0.y, v0.y, l(-1.000000) | |
mul r0.yz, v0.xxyx, v0.xxyx | |
div r0.x, r0.x, r0.z |
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
if (FAILED(D3D11CreateDevice( | |
NULL, | |
D3D_DRIVER_TYPE_HARDWARE, | |
NULL, | |
#if _DEBUG | |
D3D11_CREATE_DEVICE_DEBUG, | |
#else | |
0, | |
#endif | |
NULL, |
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
I went to see the Hobbit in HFR 3D IMAX OMGWTF today. Movie verdict: 3 hours is too long to sit in | |
the theater. It's not necessarily too long for home viewing where you can get up and move around, | |
or pause the movie and take a break, but it's too long for the theater. That said, it's a well-made | |
film and PJ keeps the story moving along, so you'll be entertained, even if your eyes and butt are | |
sore as hell by the end of it! | |
Stereo 3D verdict: yep, I still hate it. Kill it with fire. Especially the parts where they flick | |
stuff at your face - it's such a stupid, cheap trick. | |
HFR verdict: really interesting experience. The picture is great - very clear and smooth and BRIGHT |
NewerOlder