Unlike cached approach, this is simpler but takes much longer to setup on each run.
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 System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
namespace UnityLibrary | |
{ | |
[CustomEditor(typeof(SceneAsset))] | |
public class CustomThumbnail : Editor | |
{ | |
public override bool HasPreviewGUI() => true; |
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 is vscode stuff, this will run on the command line but plots might come out weird | |
import numpy as np | |
u32 = np.uint32 | |
i32 = np.int32 | |
def golden_ratio_sequence(i: u32) -> u32: | |
return u32(i) * u32(2654435769) # 0.614... in 0.32 fixed point | |
def reverse_bits32(x: u32) -> u32: | |
x = u32(x) |
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 UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using System.IO; | |
public class BatchExtractMaterials : EditorWindow | |
{ | |
private enum ExtractMode { Extract = 0, Remap = 1, Ignore = 2 }; | |
[System.Serializable] |
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
/* Created by easyaspi314. Released into the public domain. */ | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#ifdef __SSE2__ | |
#include <immintrin.h> |
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
#ifndef XOSHIRO_HPP_INCLUDED | |
#define XOSHIRO_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of a family of Xoshiro generators. | |
* | |
* See: | |
* https://arxiv.org/abs/1805.01407 | |
* http://xoshiro.di.unimi.it/xoshiro256plus.c | |
* http://xoshiro.di.unimi.it/xoshiro256starstar.c |
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
/* | |
The MIT License (MIT) | |
Copyright (c) 2018 Ivor Wanders | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 0 // self-compiling code | |
gcc -std=c99 -Wall -Wextra -pedantic -g -O3 -march=native $0 -o image_predict || exit 1 | |
exec ./image_predict $* | |
#endif | |
// Example code for pre-filtering operations that transform RGB images into | |
// representations that are better suited for lossless compression | |
// (color channel separation and decorrelation, pixel prediction). | |
// Takes a .ppm file as an input and generates multiple files in the form |
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
#ifndef XORSHIFT_HPP_INCLUDED | |
#define XORSHIFT_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of a family of truncated XorShift* generators. | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2017-19 Melissa E. O'Neill | |
* |
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
Shader "Custom/Template" | |
{ | |
Properties | |
{ | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } | |
LOD 80 |
NewerOlder