Skip to content

Instantly share code, notes, and snippets.

View SvDvorak's full-sized avatar

Andreas Wilcox SvDvorak

View GitHub Profile
@forestrf
forestrf / ShowAnimatorWindow.cs
Last active July 5, 2023 08:43
Get Unity's Animator window and show it
Type animatorWindowType = Type.GetType("UnityEditor.Graphs.AnimatorControllerTool, UnityEditor.Graphs");
var window = EditorWindow.GetWindow(animatorWindowType);
window.Show();
@radiatoryang
radiatoryang / VertexLit-Retro3D.shader
Created May 13, 2018 18:56
yet another retro3D shader for Unity with lower vertex precision / etc... made of parts from https://github.com/dsoft20/psx_retroshader and https://github.com/keijiro/Retro3D
// mostly from https://github.com/dsoft20/psx_retroshader
// mixed with parts of https://github.com/keijiro/Retro3D
// under MIT license by Robert Yang (https://debacle.us)
Shader "Custom/VertexLit-Retro3D" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Color("Color", Color) = (0.5, 0.5, 0.5, 1)
_GeoRes("Geometric Resolution", Float) = 40
}
#define PLOT_SAMPLES 3
template <FN, XMIN, XMAX, YMIN, YMAX, XGRID, YGRID>
glsl vec4 plot(vec2 pos) {
vec2 tPos = vec2(
mix(float(XMIN), float(XMAX), pos.x),
mix(float(YMIN), float(YMAX), pos.y)
);
vec2 pxSize = vec2((XMAX)-(XMIN), (YMAX)-(YMIN))*shadron_PixelSize;
@jareware
jareware / SCSS.md
Last active May 19, 2024 14:03
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso