-
A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)
-
S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]
-
[R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GLFW and OpenGL example with very verbose comments and links to documentation for learning | |
// By Soren Saket | |
// semi-colons ; are not requied in odin | |
// | |
// Every Odin script belongs to a package | |
// Define the package with the package [packageName] statement | |
// The main package name is reserved for the program entry point package | |
// You cannot have two different packages in the same directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Mobile VR Highlight" { | |
Properties { | |
_ColorOutline ("Outline", Color) = (1,1,1,1) | |
_ColorInterior ("Interior", Color) = (0.25,0.25,0.25,0.25) | |
_ColorInteriorFaded ("Interior Faded", Color) = (0.1,0.1,0.1,0.1) | |
_ColorInteriorOcc ("Interior Occluded", Color) = (0.15,0.15,0.15,0.15) | |
_ColorInteriorOccFaded ("Interior Occluded Faded", Color) = (0.05,0.05,0.05,0.05) | |
_PulseRateMod ("Pulse Rate Modifier", Float) = 4.0 | |
_OutlneWidth ("Outline Pixel Width", Float) = 1.0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TRICUBIC_INCLUDED | |
#define TRICUBIC_INCLUDED | |
float4 Cubic(float v) | |
{ | |
float4 n = float4(1.0, 2.0, 3.0, 4.0) - v; | |
float4 s = n * n * n; | |
float x = s.x; | |
float y = s.y - 4.0 * s.x; | |
float z = s.z - 4.0 * s.y + 6.0 * s.x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Kryz.Tweening | |
{ | |
// Made with the help of this great post: https://joshondesign.com/2013/03/01/improvedEasingEquations | |
// --------------------------------- Other Related Links -------------------------------------------------------------------- | |
// Original equations, bad formulation: https://github.com/danro/jquery-easing/blob/master/jquery.easing.js | |
// A few equations, very simplified: https://gist.github.com/gre/1650294 | |
// Easings.net equations, simplified: https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace TerrorSquid.Collisions { | |
public static class CoordsRadius1 { | |
public static readonly Vector3[] coords = { | |
new Vector3(-1, -1, -1).normalized, | |
new Vector3(0, -1, -1).normalized, | |
new Vector3(1, -1, -1).normalized, | |
new Vector3(-1, -1, 0).normalized, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class LengthTable { | |
public float[] distances; | |
int SmpCount => distances.Length; | |
float TotalLength => distances[SmpCount - 1]; | |
public LengthTable( OrientedCubicBezier3D bezier, int precision = 16 ) { | |
distances = new float[precision]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example of how to move a current value towards a target value at a constant speed | |
// without going over the target value | |
// formula is the same for vectors of any dimension | |
Vector3 Seek(Vector3 currentValue, Vector3 targetValue, float maxSpeed, float dt) | |
{ | |
// delta/difference from current value to target value | |
Vector3 delta = targetValue - currentValue; | |
// don't take the square root of magnitude yet | |
// so we can potentially early out on degenerate case of currenvValue ~= targetValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Simplex noise custom node for Shader Graph | |
// | |
// Original work (webgl-noise) Copyright (C) 2011 Ashima Arts. | |
// Translation and modification was made by Keijiro Takahashi. | |
// Ported to Shader Graph by Sergio L. Valladares | |
// | |
// This shader is based on the webgl-noise GLSL shader. For further details | |
// of the original shader, please see the following description from the | |
// original source code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Mathematics; | |
using UnityEngine; | |
public class NativeMeshTest : MonoBehaviour | |
{ | |
private NativeArray<float3> vertexBuffer; | |
private Vector3[] vertexArray; |
NewerOlder