Skip to content

Instantly share code, notes, and snippets.

View phi-lira's full-sized avatar

Felipe Lira phi-lira

View GitHub Profile
@phi-lira
phi-lira / OverdrawDebugReplacement.cs
Last active December 21, 2021 15:31
Overdraw Debugger Unity
using UnityEngine;
using System.Collections;
public class OverdrawDebugReplacement : MonoBehaviour
{
public Shader _OverdrawShader;
private Camera _Camera;
private bool _SceneFogSettings = false;
@phi-lira
phi-lira / manifest.json
Last active October 28, 2021 05:10
Lightweight Pipeline package manager manifest
{
"registry": "https://staging-packages.unity.com",
"dependencies": {
"com.unity.render-pipelines.lightweight" : "2.0.0-preview"
}
}
@phi-lira
phi-lira / PhysicallyBasedExample.shader
Last active May 19, 2020 05:42
Physically Based Example shader that works with Lightweight Render Pipeline (LWRP) 4.X.X-preview
Use https://gist.github.com/phi-lira/225cd7c5e8545be602dca4eb5ed111ba instead.
@phi-lira
phi-lira / PerfTracker.cs
Created March 16, 2018 18:02
Performance Tracker scripts.
// 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
phi-lira / manifest_example_mac_fullpath
Last active April 6, 2020 12:12
Example of manifest pointing lightweight and core SRP packages to a local folder.
{
"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",
}
}
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
[Ll]ibrary/
sysinfo.txt
ShaderForge.dll
Assets/ShaderForge/
// As seen on https://gamedevdaily.io/the-srgb-learning-curve-773b7f68cf7a
float D3DX_FLOAT_to_SRGB(float val)
{
if( val < 0.0031308f )
val *= 12.92f;
else
val = 1.055f * pow(val,1.0f/2.4f) — 0.055f;
return val;
}
@phi-lira
phi-lira / AndroidManifest.xml
Last active January 20, 2016 13:25
Mali Graphics Debugger Activity. It extends UnityNativePlayerActivity and loads MGD library in order to connect MGD to Unity
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>