collecting links and documents about the topic
Object Systems (2004, as used in Thief 1998) http://chrishecker.com/images/6/6f/ObjSys.ppt
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| [System.AttributeUsage(System.AttributeTargets.Field)] | |
| public class RenameAttribute : PropertyAttribute | |
| { | |
| public string[] renamePairs; | |
| public RenameAttribute(params string[] renamePairs) | |
| { |
| #pragma once | |
| #define DYN_ARR_OF(type) struct { \ | |
| type *data; \ | |
| type *endptr; \ | |
| uint32_t capacity; \ | |
| } | |
| #if !defined(__cplusplus) | |
| #define decltype(x) void* |
| // Non Editor code | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public abstract class TrafficLightAttribute : PropertyAttribute | |
| { | |
| public bool DrawLabel = true; | |
| public string CustomLabel; | |
| public bool AlsoDrawDefault; |
| #define BINKGL_LIST \ | |
| /* ret, name, params */ \ | |
| GLE(void, LinkProgram, GLuint program) \ | |
| GLE(void, GetProgramiv, GLuint program, GLenum pname, GLint *params) \ | |
| GLE(GLuint, CreateShader, GLenum type) \ | |
| GLE(void, ShaderSource, GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) \ | |
| GLE(void, CompileShader, GLuint shader) \ | |
| GLE(void, GetShaderiv, GLuint shader, GLenum pname, GLint *params) \ | |
| GLE(void, GetShaderInfoLog, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) \ | |
| GLE(void, DeleteShader, GLuint shader) \ |
collecting links and documents about the topic
Object Systems (2004, as used in Thief 1998) http://chrishecker.com/images/6/6f/ObjSys.ppt
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
| //Based on a brilliant idea by Matthew Wegner - https://twitter.com/mwegner/status/355147544818495488 | |
| //Code for drawing the base PropertyDrawers is from here: http://forum.unity3d.com/threads/173401-Getting-Default-SerializedProperty-Drawing-within-a-PropertyDrawer?p=1186347&viewfull=1#post1186347 | |
| //My implementation is super lazy with magic numbers everywhere! :D | |
| #if UNITY_EDITOR | |
| using System; | |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| using UnityEditor; |
| This file (with a leading space) exists so that the gist has a sensible name, rather than "LICENSE." |