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/Warlocracy/CharacterShader" | |
{ | |
Properties | |
{ | |
_MainTex ("Sprite Texture", 2D) = "white" {} | |
_OutlineColor ("Outline Color", Color) = (1,1,1,1) | |
_OutlineWidth ("Outline Width", float) = 2 | |
[HideInInspector] _Color ("Tint", Color) = (1,1,1,1) | |
[HideInInspector] _RendererColor ("RendererColor", Color) = (1,1,1,1) |
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
//============================================================================================================================== | |
// An optimized AMD FSR 1.0 implementation for Mobiles | |
// EASU and RCAS are combined in a single pass. | |
// Based on https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_fsr1.h | |
// Details can be found: https://atyuwen.github.io/posts/optimizing-fsr/ | |
// Distributed under the MIT License. Copyright (c) 2021 atyuwen. | |
// -- FsrEasuSampleH should be implemented by calling shader, like following: | |
// AH3 FsrEasuSampleH(AF2 p) { return MyTex.SampleLevel(LinearSampler, p, 0).xyz; } | |
//============================================================================================================================== | |
void FsrMobile( |
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
// MIT LICENSE Copyright (c) 2020 Jeffrey Vella | |
// https://gist.github.com/jeffvella/dee1a82bd5edfcdc9d3067d8c038f95c/edit | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Entities; | |
using Unity.Jobs.LowLevel.Unsafe; | |
using UnityEngine; |
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 UnityEngine.LowLevel; | |
using UnityEngine.PlayerLoop; | |
public static class AddPlayerLoopCallback | |
{ | |
// Add a callback to the PreUpdate phase | |
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] | |
static void Setup() | |
{ |
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.Diagnostics; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Jobs.LowLevel.Unsafe; | |
using Unity.Mathematics; | |
using UnityEditor; | |
using Debug = UnityEngine.Debug; | |
using System.Runtime.CompilerServices; |
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; | |
public class MeshBlit : MonoBehaviour | |
{ | |
public RenderTexture rt; | |
public Mesh mesh; | |
public Material material; | |
public Vector3 meshPosition = new Vector3(0.5f, 0.5f, -1); |
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
public unsafe class JobTestSystem : JobComponentSystem | |
{ | |
private ProfilerMarker _marker; | |
protected override void OnCreateManager() | |
{ | |
_marker = new ProfilerMarker("Job1z"); | |
} | |
protected override JobHandle OnUpdate(JobHandle inputDeps) |
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.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Entities; | |
using UnityEngine; | |
using UnityEngine.Profiling; |
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.Concurrent; | |
using System.Collections.Generic; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Entities; | |
using Unity.Mathematics; | |
using UnityEngine; | |
public struct LevelDataComponent : IComponentData |
NewerOlder