Skip to content

Instantly share code, notes, and snippets.

View hvent90's full-sized avatar

Henry Ventura hvent90

View GitHub Profile
@hvent90
hvent90 / MassStateTreeTask.cpp.template
Last active September 9, 2022 10:43
Add these files to Engine\Content\Editor\Templates to have file templates in Jetbrains Rider
%COPYRIGHT_LINE%
%PCH_INCLUDE_DIRECTIVE%
%MY_HEADER_INCLUDE_DIRECTIVE%
%ADDITIONAL_INCLUDE_DIRECTIVES%
#include "MassStateTreeExecutionContext.h"
#include "StateTreeLinker.h"
void %PREFIXED_CLASS_NAME%::Link(FStateTreeLinker& Linker)
@hvent90
hvent90 / ue_massentity_hacks.patch
Created August 12, 2022 18:30
misc. massentity/statetree/smartobjects/zonegraph source hacks
diff --git a/Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Private/MassStateTreeExecutionContext.cpp b/Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Private/MassStateTreeExecutionContext.cpp
index 5473fc5776fc..c53f9827eda2 100644
--- a/Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Private/MassStateTreeExecutionContext.cpp
+++ b/Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Private/MassStateTreeExecutionContext.cpp
@@ -1,3 +1,4 @@
+
// Copyright Epic Games, Inc. All Rights Reserved.
#include "MassStateTreeExecutionContext.h"
diff --git a/Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Private/Tasks/MassFindSmartObjectTask.cpp b/Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Private/Tasks/MassFindSmartObjectTask.cpp
@hvent90
hvent90 / VolumetricController.cs
Created April 9, 2020 17:30
Editing Volumetric Fog during runtime
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
public class VolumetricController : MonoBehaviour
{
[Range(-1f, 1f)]
public float anistropy;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereShake : MonoBehaviour
{
public bool gravity;
[Header("Shake")]
// When enabled, the object will shake.
@hvent90
hvent90 / Fabrik.cs
Last active February 25, 2019 00:39
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace IK_V3
{
public class Fabrik : MonoBehaviour
{
public Transform rootSubject;
public Transform target;
Shader "Raymarch/RaymarchHDRP"
{
SubShader
{
Cull Off ZWrite Off ZTest Always
Pass
{
HLSLPROGRAM
// !!IMPORTANT!!
// The file name of this script MUST be RaymarchPostProcess.cs in order for it to be properly serialized!
// ------------------------------------------------
using System;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
[Serializable]
Shader "Raymarch/RaymarchHDRP"
{
SubShader
{
Cull Off ZWrite Off ZTest Always
Pass
{
HLSLPROGRAM
using System;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
[Serializable]
public sealed class ShaderParameter : ParameterOverride<Shader> { }
[Serializable]
[PostProcess(typeof(RaymarchPostProcessRenderer), PostProcessEvent.AfterStack, "Raymarch/RaymarchHDRP")]
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Raymarch/clouds2" {
Properties {
_MainTex("main tex", 2D) = "white" {}
_ValueNoise("value noise", 2D) = "white" {}
}
HLSLINCLUDE
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"