This file contains 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
//TODO: support multiple files! | |
#include "raylib.h" | |
#include <string.h> | |
#include <stdlib.h> | |
#include "stb_ds.h" | |
static char* _MainFile_text; | |
static long _MainFile_lastModTime; |
This file contains 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
@Echo Off | |
rem === One-Click-Unity === | |
rem Intendet to make lifes easier for less tech-savy people (and yourself) in your team by automating these tasks. | |
rem Features: | |
rem * Open a Unity project with one click. | |
rem * Can install specfic Unity versions if missing with a single key-stroke. | |
rem * (optional) SVN and Git related automation, check the comments down below. | |
rem Install: |
This file contains 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.Threading.Tasks; | |
namespace DoubleIntTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Start..."); |
This file contains 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
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
// However, if you want to author shaders in shading language you can use this teamplate as a base. | |
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader. | |
// This shader works with URP 7.1.x and above | |
Shader "Universal Render Pipeline/Custom/Physically Based Example" | |
{ | |
Properties | |
{ | |
// Specular vs Metallic workflow | |
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 |
This file contains 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
#NOTE: Dont't forget to modify these vars to your setup | |
JNI_LIBS=./android-project/app/src/main/jniLibs | |
LIB_NAME=libmain.so | |
SDL2_LIBS=SDL2-2.0.12Copy/libs | |
BUILD_MODE=release | |
#copy sdl2 libs into rusts build dir | |
mkdir -p ./target/aarch64-linux-android/$BUILD_MODE/deps/ | |
mkdir -p ./target/armv7-linux-androideabi/$BUILD_MODE/deps/ | |
mkdir -p ./target/i686-linux-android/$BUILD_MODE/deps/ |
This file contains 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; | |
using UnityEngine.XR; | |
public class LogXRStatus : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
void Start() | |
{ |
This file contains 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
/* | |
* A simple Voronoi Generator and visualizer for Unity with Burst. | |
* USAGE: Place on any empty Game Object. | |
* @schneckerstein | |
*/ | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Jobs; | |
using Unity.Mathematics; |
This file contains 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
//based on: | |
//http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/ | |
float biasScale = abs(unity_WorldToShadow[0][2][2]); | |
float NdotL_Sat_sqr = NdotL_Sat * NdotL_Sat; | |
float bias = rsqrt(NdotL_Sat_sqr / (1.0 - NdotL_Sat_sqr)); //suggested by @TastyTexel: https://twitter.com/TastyTexel/status/1180983378394439681?s=20 | |
bias *= biasScale * 0.25; //adjust 0.25 to personal need | |
#if UNITY_REVERSED_Z | |
o._ShadowCoord.z += bias; |
This file contains 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
#define inverseLerp(a,b,x) ((x-a)/(b-a)) | |
... | |
half rawSdf = _Mask.Sample(sampler_Mask, i.uv).r ; | |
half texelCoverage = fwidth(i.uv) * _Mask_TexelSize.zw; // calculate texelCoverage | |
texelCoverage = saturate(texelCoverage); //clamp texelCoverage to [0..1] | |
// you can also use smoothstep(), but inverseLerp uses less instructions | |
half filteredSdf = saturate(inverseLerp(-texelSize, texelSize, rawSdf * 2.0 - 1.0)); |
This file contains 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 "Unlit/MadVsDot" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_TestVector("_TestVector", Vector) = (0,1,2,3) | |
[Toggle(DOT_VARIANT)] _DOT_VARIANT("DOT_VARIANT", Int) = 0 | |
} | |
SubShader |
NewerOlder