Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Ochs gamemachine

View GitHub Profile
View crestboat.cs
using Crest;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;
namespace AiGame.Boats
{
public class KinematicBuoyancy : MonoBehaviour
{
View VertexSkinning.shader
// For the new DOTS animation. Although you need to use DrawMeshInstanced yourself, Hybrid renderer does not support instanced
// props for builtin.
Shader "Custom/VertexSkinning"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
View HttpServer.cs
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Server.Http
{
public class HttpServer
View EcsWorld.cs
using AiGame.Ecs.Systems;
using AiNav;
using System;
using System.Collections.Generic;
using Unity.Collections;
using UnityEngine;
namespace Unity.Entities
{
public class EditorModeSystemConfig
View crestfog.cginc
[Header(Fog)]
[Toggle] _ApplyFog("Enable", Float) = 1
_FogColor("Fog Color (RGB)", Color) = (0.5, 0.5, 0.5, 1.0)
_FogStart("Fog Start", Float) = 0.0
_FogEnd("Fog End", Float) = 10.0
#pragma shader_feature _APPLYFOG_ON
fixed4 _FogColor;
View MicroSplatBoundsHole.cs
using Sirenix.OdinInspector;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
namespace AiGame.Terrains
{
public class MicroSplatBoundsHole : MonoBehaviour
{
private const int MaxHoles = 50;
View clipbounds.shader
void ClipBounds(float4 bounds, float2 pos) {
float2 min = bounds.xy;
float2 max = bounds.zw;
float a = step(min.x, pos.x);
float b = step(pos.x, max.x);
float c = step(min.y, pos.y);
float d = step(pos.y, max.y);
clip(3.0f - a - b - c - d);
View BakedOceanDepthCache.cs
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Crest
{
public class BakedOceanDepthCache : MonoBehaviour
{
[SerializeField]
View SplatWeights.cs
using Unity.Mathematics;
using UnityEngine;
namespace AiGame.Terrains
{
public struct SplatWeights
{
public float Splat0;
public float Splat1;
public float Splat2;
View UnityPhysicsMods.cs
using System;
using Unity.Collections;
using Unity.Mathematics;
namespace AiGame.UnityPhysics
{
public class UnityPhysicsMods
{
You can’t perform that action at this time.