Skip to content

Instantly share code, notes, and snippets.

//Original code from:
//https://github.com/RishiAstra/Survive-From-Scratch/blob/21d98a4dcbb3ef25a79bb3ca9733b35b866eda74/Assets/AwesomeTechnologies/VegetationStudio/Utility/LightProbeUtility.cs
//Added EvaluateSH2 method to evaluate the SH2 with C#, so it will work with Unity Jobs
public class LightProbeUtility
{
public struct LightProbeData
{
public Vector4 unity_SHAr;
public Vector4 unity_SHAg;
public Vector4 unity_SHAb;
Shader "Hidden/SpecularDiffuseToAlbedo"
{
SubShader
{
// No culling or depth
Cull Off ZWrite Off ZTest Always
Pass
{
precision highp float;
varying vec2 vUv;
varying vec3 vecPos;
varying vec3 vecNormal;
uniform sampler2D _Diffuse;
uniform sampler2D _Specular;
@rickomax
rickomax / UVCoordinatesEditor.mel
Created November 28, 2020 17:39
MELScript to edit Maya mesh UVs by using values
global proc CreateUI() {
global int $job;
if (`window -ex _uv_window`) {
return;
}
$job = `scriptJob -idleEvent UpdateUI`;
window -t "UV Coordinates Editor" _uv_window;
columnLayout;
rowLayout -numberOfColumns 4;
text "u";