- 2011 - A trip through the Graphics Pipeline 2011
- 2013 - Performance Optimization Guidelines and the GPU Architecture behind them
- 2015 - Life of a triangle - NVIDIA's logical pipeline
- 2015 - Render Hell 2.0
- 2016 - How bad are small triangles on GPU and why?
- 2017 - GPU Performance for Game Artists
- 2019 - Understanding the anatomy of GPUs using Pokémon
This file contains hidden or 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
| /* | |
| Based on the Anti-aliased Euclidean distance transform described by Stefan Gustavson and | |
| Robin Strand. For further information, see https://contourtextures.wikidot.com/ and | |
| https://web.archive.org/web/20220503051209/https://weber.itn.liu.se/~stegu/edtaa/ | |
| The algorithm is an adapted version of Stefan Gustavson's code, it inherits the copyright | |
| statement below, which applies to this file only. | |
| The rewrite with Unity Burst support makes the execution 40 times faster by default, | |
| and 75 times faster if the passed in textures are both of type TextureFormat.RGBAFloat. |
This file contains hidden or 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
| #include <gdnative_api_struct.gen.h> | |
| #include <libavcodec/avcodec.h> | |
| #include <libavutil/avutil.h> | |
| #include <libavformat/avformat.h> | |
| #include <libavutil/imgutils.h> | |
| #include <pthread.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
This file contains hidden or 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 "WorldNormalFromDepthTexture" | |
| { | |
| Properties { | |
| [KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
| LOD 100 |
This file contains hidden or 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 hidden or 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
| // | |
| // @reference https://faithandbrave.hateblo.jp/entry/20100318/1268896477 | |
| // @memo | |
| // on CentOS: | |
| // yum install libicu libicu-devel | |
| // g++ -std=c++14 -o cvt convert.cpp `pkg-config --libs --cflags icu-uc icu-io` | |
| // | |
| #include <iostream> | |
| #include <vector> |
This file contains hidden or 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; | |
| using UnityEditor.ShaderGraph; | |
| using System.Reflection; | |
| // IMPORTANT: | |
| // - tested with LWRP and Shader Graph 4.6.0-preview ONLY | |
| // - likely to break in SG 5.x and beyond | |
| // - for HDRP, add your own keyword to detect environment | |
| [Title("Custom", "Main Light Data")] |
This file contains hidden or 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.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class BoxMover : MonoBehaviour | |
| { | |
| public enum Slide | |
| { | |
| None, | |
| Perpendicular, |
This file contains hidden or 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 _POLYNOMIAL_REGRESSION_H | |
| #define _POLYNOMIAL_REGRESSION_H __POLYNOMIAL_REGRESSION_H | |
| /** | |
| * PURPOSE: | |
| * | |
| * Polynomial Regression aims to fit a non-linear relationship to a set of | |
| * points. It approximates this by solving a series of linear equations using | |
| * a least-squares approach. | |
| * | |
| * We can model the expected value y as an nth degree polynomial, yielding |
C++ code style written in markdown.
Astyle code automatic formatting settings
You can use clang-format too.
Use tools like vera++
NewerOlder