Skip to content

Instantly share code, notes, and snippets.

using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;
class ShaderBuildProcessor : IPreprocessShaders
{
ShaderVariantCollection whitelist;
@guycalledfrank
guycalledfrank / BakeryDecodeLightmap.hlsl
Last active February 6, 2020 11:42
Updated SG include with metalness
#define BAKERY_INV_PI 0.31830988618f
sampler2D _RNM0, _RNM1, _RNM2;
void LightmapUV_float(float2 uv, out float2 lightmapUV)
{
lightmapUV = uv * unity_LightmapST.xy + unity_LightmapST.zw;
}
void DecodeLightmap(float4 lightmap, out float3 result)
#pragma once
#include "alphaBufferGenInterface.h"
#include "uvGBufferGenInterface.h"
#include "BakeryHelperInterface.h"
#include "stdint.h"
#include <cstdio>
#include <vector>
#include <string>
namespace Bakery