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 UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
public class FullscreenShaderFeature : ScriptableRendererFeature | |
{ | |
[SerializeField] | |
private Material material; | |
class CustomRenderPass : ScriptableRenderPass |
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
#include<iostream> | |
#include<fstream> | |
#include<algorithm> | |
#include<string> | |
#include<glad/glad.h> | |
#include<GLFW/glfw3.h> | |
// Example: GLuint program = loadShader("src/shaders/vertexShader.vert", "src/shaders/fragmentShader.frag"); | |
GLuint loadShader(const char* vertex_path, const char* fragment_path) { // Returns OpenGL shaderProgram |
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 "Sprites/JitterFreeLit" | |
{ | |
Properties | |
{ | |
_MainTex("Diffuse", 2D) = "white" {} | |
_MaskTex("Mask", 2D) = "white" {} | |
_NormalMap("Normal Map", 2D) = "bump" {} | |
// Legacy properties. They're here so that materials using this shader can gracefully fallback to the legacy sprite shader. | |
[HideInInspector] _Color("Tint", Color) = (1,1,1,1) |
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; | |
public class LookAt2d : MonoBehaviour { | |
public GameObject target; | |
void LookAtObject () { |
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.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public static class Program | |
{ | |
public static async Task Main(string[] args) | |
{ |
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
/* | |
Copyright (c) 2020 Chan Jer Shyan | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |