Skip to content

Instantly share code, notes, and snippets.

View AlwinJoshy's full-sized avatar
💭
Howling at the Moon

Alwin Joshy Joseph AlwinJoshy

💭
Howling at the Moon
View GitHub Profile
@phi-lira
phi-lira / UnlitTexture.shader
Last active March 23, 2024 18:12
URP Unlit Texture example
Shader "Custom/UnlitTexture"
{
Properties
{
[MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1)
[MainTexture] _BaseMap("BaseMap", 2D) = "white" {}
}
// Universal Render Pipeline subshader. If URP is installed this will be used.
SubShader
@elringus
elringus / RenderMyCustomPass.cs
Last active September 27, 2024 03:44
Example for adding custom render passes via renderer features for lightweight render pipeline (LWRP)
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.LWRP;
// Inheriting from `ScriptableRendererFeature` will add it to the
// `Renderer Features` list of the custom LWRP renderer data asset.
public class RenderMyCustomPass : ScriptableRendererFeature
{
private class MyCustomPass : ScriptableRenderPass
{
@Saduras
Saduras / ParallaxMapping.shader
Last active February 11, 2024 10:28
Parallax mapping shader for Unity
// Based on tutorial:
// https://learnopengl.com/#!Advanced-Lighting/Parallax-Mapping
Shader "Custom/ParallaxMapping"
{
Properties
{
_MainTex ("Diffuse", 2D) = "white" {}
_NormalMap ("Normal", 2D) = "white" {}
_NormalActive ("NormalActive", Int) = 1
@DashW
DashW / ScreenRecorder.cs
Last active October 30, 2024 20:05
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)