Operator % has changed, probably current code with it need a fix
// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
var h = n * 747796405u + 2891336453u;
h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;| // NOTE: Must bind 8x single mip RWTexture views, because HLSL doesn't have .mips member for RWTexture2D. (SRVs only have .mips member) | |
| // NOTE: globallycoherent attribute is needed. Without it writes aren't guaranteed to be seen by other groups | |
| globallycoherent RWTexture2D<float> MipTextures[8]; | |
| RWTexture2D<uint> Counters[8]; | |
| groupshared uint CounterReturnLDS; | |
| [numthreads(16, 16, 1)] | |
| void GenerateMipPyramid(uint3 Tid : SV_DispatchThreadID, uint3 Group : SV_GroupId, uint Gix : SV_GroupIndex) | |
| { | |
| [unroll] |
| #include <urlmon.h> | |
| #pragma comment(lib, "urlmon.lib") | |
| bool download(const char* url, OutputMemoryStream& blob) { | |
| IStream* stream = nullptr; | |
| if (S_OK != URLOpenBlockingStream(nullptr, url, &stream, 0, nullptr)) { | |
| return false; | |
| } | |
| char buffer[4096]; | |
| ULONG read = 0; |
| namespace StagPoint.Math | |
| { | |
| using System; | |
| using UnityEngine; | |
| using Mono.Simd; | |
| public class BoundingFrustum | |
| { | |
| #region Public fields |
| Shader "WorldNormalFromDepthTexture" | |
| { | |
| Properties { | |
| [KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
| LOD 100 |