Video from jsturgis gist
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
// David Evans @phosphoer | |
// Feel free to use this in your commercial projects | |
// Let me know if you do cause it will make me feel good and stuff | |
using UnityEngine; | |
using System.Collections.Generic; | |
using System; | |
#if UNITY_EDITOR | |
using UnityEditor; |
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
// 2 sided standard surface shader (using 2 passes), with fixed normals for flipped faces | |
Shader "Custom/TwoSided (FixedNormals)" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 |
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 System.Collections; | |
// This is not need but I just wanted to make the point clear. | |
public class AnimatedComponent : MonoBehaviour | |
{ | |
} |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
[CustomEditor(typeof(PrefabNode))] | |
public class PrefabNodeEditor | |
: Editor |
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; | |
using System.Collections.Generic; | |
using System.Text; | |
using UnityEditor; | |
using UnityEditor.Compilation; | |
using UnityEngine; | |
[InitializeOnLoad] | |
public class AsmdefDebug | |
{ |
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
// | |
// ContentView.swift | |
// MetalSwiftUI | |
// | |
// Created by Zach Eriksen on 9/8/20. | |
// Copyright © 2020 oneleif. All rights reserved. | |
// | |
// Inspired [MetalUI](https://github.com/0xLeif/MetalUI) | |
import SwiftUI |
Minimal sprite rendering example written in C with SDL2
for windowing, sokol_gfx
for graphics API using WebGL2/GLES3, stb_image
for loading image, compiled in WebAssembly with Emscripten.
- Clone the repositories
sokol
andstb
in thedeps
folder - Add an image (sky.png) in
assets
directory - Compile and build with the following command (need Emscripten installed):
OlderNewer