duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| // The following code is licensed under the MIT license: https://gist.github.com/TheRealMJP/bc503b0b87b643d3505d41eab8b332ae | |
| // Samples a texture with Catmull-Rom filtering, using 9 texture fetches instead of 16. | |
| // See http://vec3.ca/bicubic-filtering-in-fewer-taps/ for more details | |
| float4 SampleTextureCatmullRom(in Texture2D<float4> tex, in SamplerState linearSampler, in float2 uv, in float2 texSize) | |
| { | |
| // We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding | |
| // down the sample location to get the exact center of our "starting" texel. The starting texel will be at | |
| // location [1, 1] in the grid, where [0, 0] is the top left corner. | |
| float2 samplePos = uv * texSize; |
| double MaskOutFraction(double v) | |
| { | |
| // Alias double as 2 32-bit integers | |
| uint d0, d1; | |
| asuint(v, d0, d1); | |
| // 0 ... 51 mantissa 0 ... 19 | |
| // 52 ... 62 exponent 20 ... 30 | |
| // 63 ... 63 sign |
| Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes. | |
| It's an ever-growing list. | |
| ------------------------------ | |
| Relevant links: | |
| http://en.wikipedia.org/wiki/Types_of_mesh | |
| http://en.wikipedia.org/wiki/Tetrahedron | |
| http://en.wikipedia.org/wiki/Simplicial_complex |
| // cl /nologo /I "%DXSDK_DIR%\Include" rastafontgpu.cpp /link /LIBPATH:"%DXSDK_DIR%\Lib\x86" | |
| #include <tchar.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <windows.h> | |
| #include <D3D11.h> | |
| #pragma comment(lib, "kernel32.lib") |
| // float->sRGB8 conversions - two variants. | |
| // by Fabian "ryg" Giesen | |
| // | |
| // I hereby place this code in the public domain. | |
| // | |
| // Both variants come with absolute error bounds and a reversibility and monotonicity | |
| // guarantee (see test driver code below). They should pass D3D10 conformance testing | |
| // (not that you can verify this, but still). They are verified against a clean reference | |
| // implementation provided below, and the test driver checks all floats exhaustively. | |
| // |
| // float->half variants. | |
| // by Fabian "ryg" Giesen. | |
| // | |
| // I hereby place this code in the public domain, as per the terms of the | |
| // CC0 license: | |
| // | |
| // https://creativecommons.org/publicdomain/zero/1.0/ | |
| // | |
| // float_to_half_full: This is basically the ISPC stdlib code, except | |
| // I preserve the sign of NaNs (any good reason not to?) |