Skip to content

Instantly share code, notes, and snippets.

View Stektpotet's full-sized avatar
🎯
Focusing

Halvor Stektpotet

🎯
Focusing
  • Norwegian University of Science and Technology, SINTEF Ocean
  • Trondheim, Norway
View GitHub Profile
@Stektpotet
Stektpotet / MinMaxSliderAttribute.cs
Created May 14, 2019 20:37
MinMax attribute with text fields to set upper and lower limits
using UnityEngine;
public class MinMaxSliderAttribute : PropertyAttribute
{
public readonly float max;
public readonly float min;
public MinMaxSliderAttribute( float min, float max )
{
this.min = min;
this.max = max;
@Stektpotet
Stektpotet / Something.hlsl
Last active January 2, 2020 14:33
Compute Shader variations
//named with '.hlsl' extension to get highlighting, it's really a '.compute'-file
#pragma kernel CSMain
RWTexture3D<float4> Result;
// if Shader Model doesn't support kernel threadgroups in the Z axis
// organize the threads differently
#if SHADER_TARGET < 40
[numthreads(16, 16, 1)]
#else