Skip to content

Instantly share code, notes, and snippets.

View JonRurka's full-sized avatar

jon Rurka JonRurka

View GitHub Profile
Shader "Custom/PlantShader"
{
Properties
{
_MainTex ("Texture", 2D) = "gray" {}
_Ambience("Ambience", Float) = 1
}
SubShader
{
//Tags { "Queue" = "AlphaTest" "RenderType" = "Transparent" }
@JonRurka
JonRurka / ArbitraryMatrix.cs
Last active January 23, 2018 20:30
An arbitrary size matrix with addition, subtraction and multiplication.
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
public class Matrix {
private float[,] data;
public int Rows { get; private set; }
public int Columns { get; private set; }
public TileLocation[] GetTouchingTiles(float distance) {
TileLocation thisTile = GetTileLocation();
List<TileLocation> touchingTiles = new List<TileLocation>();
// +1,-1
if (Distance(new LatLng(thisTile.Latitude + 1, thisTile.Longitude)) <= distance)
touchingTiles.Add(thisTile + new TileLocation(1, -1));
// +1,0
if (Distance(new LatLng(thisTile.Latitude + 1, Longitude)) <= distance)
Shader "GUI/3D Text Shader" {
Properties
{
_MainTex("Font Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent" }
/* Procedural Terrain Generation
* Peter Taylor (EmersonT1)
* Created: 29th November 2015
* A C# implementation of http://www.stuffwithstuff.com/robot-frog/3d/hills/index.html
*/
using System;
namespace Test1
{
class TerrainGen
@JonRurka
JonRurka / test.cs
Last active November 3, 2015 21:13
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace loopBenchmark
{
class Program
map data:
{
"$type": "WarWorldInfServer.SerializationStructs+MapData, WarWorldInfServer",
"response": 0,
"seed": 0,
"width": 1400,
"height": 880,
"module": {
"$type": "LibNoise.Perlin, WarWorldInfServer",
"Frequency": 1.0,
Internal error. Please report to https://github.com/consulo/consulo/issues
com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.openapi.roots.ModuleRootManager'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:250)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:40)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:599)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:619)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(Co
public void SpawnChunk(Vector3Int location)
{
if (!pageController.BuilderExists(location.x, location.y, location.z))
{
SmoothChunk chunkInstance = new SmoothChunk();
ScriptComponent scriptComp = new ScriptComponent();
Entity chunkObj = new Entity();
//chunkObj.Transform.Parent = Entity.Transform;
SceneSystem.SceneInstance.Scene.AddChild<Entity>(chunkObj);
chunkObj.Name = string.Format("Chunk_{0}.{1}.{2}", location.x, location.y, location.z);
System.AggregateException: One or more errors occurred. ---> System.InvalidOpera
tionException: Could not compile shader. See error messages.[]: Error: C:/Progra
m Files/Silicon Studio Corp/Paradox/GamePackages/Paradox.1.1.0-beta/Assets/Share
d/Images/DepthMinMax/DepthMinMaxShader.pdxsl(28,25-89): error X4532: cannot map
expression to ps_4_0 instruction set
at SiliconStudio.Paradox.Rendering.EffectSystem.CheckResult(LoggerResult comp
ilerResult)
at SiliconStudio.Paradox.Rendering.EffectSystem.CreateEffect(String effectNam
e, EffectBytecodeCompilerResult effectBytecodeCompilerResult, CompilerResults co