Skip to content

Instantly share code, notes, and snippets.


Felipe Lira phi-lira

View GitHub Profile
phi-lira / OverdrawDebugReplacement.cs
Last active Dec 21, 2021
Overdraw Debugger Unity
View OverdrawDebugReplacement.cs
using UnityEngine;
using System.Collections;
public class OverdrawDebugReplacement : MonoBehaviour
public Shader _OverdrawShader;
private Camera _Camera;
private bool _SceneFogSettings = false;
phi-lira / CustomMaterialEditor.cs
Created Jan 20, 2016
CustomMaterialEditor - Unity
View CustomMaterialEditor.cs
//Copyright(c) 2015 Phil Lira - phil.rlira [at] gmail [dot] com
//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:
//The above copyright notice and this permission notice shall be included in all
phi-lira / AndroidManifest.xml
Last active Jan 20, 2016
Mali Graphics Debugger Activity. It extends UnityNativePlayerActivity and loads MGD library in order to connect MGD to Unity
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="" package="com.arm.mgdactivity" android:versionName="1.0.0" android:versionCode="1">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:debuggable="false">
<activity android:name="com.arm.mgdactivity.MGDNativeActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:configChanges="screenSize|orientation|keyboardHidden|keyboard">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
View Unity Default .gitignore file
# =============== #
# Unity generated #
# =============== #
View sRGBEquation.cpp
// As seen on
float D3DX_FLOAT_to_SRGB(float val)
if( val < 0.0031308f )
val *= 12.92f;
val = 1.055f * pow(val,1.0f/2.4f) — 0.055f;
return val;
phi-lira / manifest.json
Last active Oct 28, 2021
Lightweight Pipeline package manager manifest
View manifest.json
"registry": "",
"dependencies": {
"com.unity.render-pipelines.lightweight" : "2.0.0-preview"
phi-lira / UniversalPipelineTemplateShader.shader
Last active Nov 28, 2022
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
View UniversalPipelineTemplateShader.shader
// 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"
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
phi-lira / manifest_example_mac_fullpath
Last active Apr 6, 2020
Example of manifest pointing lightweight and core SRP packages to a local folder.
View manifest_example_mac_fullpath
"dependencies": {
"com.unity.render-pipelines.core": "file:/users/felipe/Development/Graphics/com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:/users/felipe/Development/Graphics/com.unity.shadergraph",
"com.unity.render-pipelines.universal": "file:/users/felipe/Development/Graphics/com.unity.render-pipelines.universal",
phi-lira / PerfTracker.cs
Created Mar 16, 2018
Performance Tracker scripts.
View PerfTracker.cs
// Script made by aleks01010101
// Slightly modified
// Displays avg and median ms + frames sampled during clipLenght
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PerfTracker : MonoBehaviour {
public float clipLength = 20.0f;
phi-lira / PhysicallyBasedExample.shader
Last active May 19, 2020
Physically Based Example shader that works with Lightweight Render Pipeline (LWRP) 4.X.X-preview
View PhysicallyBasedExample.shader
Use instead.