Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube
🏴☠️
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.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using Debug = UnityEngine.Debug; | |
| using Object = UnityEngine.Object; | |
| namespace FoundationEditor.Editor.ReferenceFinder | |
| { |
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 __QUATERNION_INCLUDED__ | |
| #define __QUATERNION_INCLUDED__ | |
| #define QUATERNION_IDENTITY float4(0, 0, 0, 1) | |
| #ifndef PI | |
| #define PI 3.14159265359f | |
| #endif | |
| // Quaternion multiplication |
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 __MATRIX_INCLUDED__ | |
| #define __MATRIX_INCLUDED__ | |
| #define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
| float4x4 inverse(float4x4 m) { | |
| float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
| float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
| float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
| float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
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; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Profiling; | |
| public class KdTree<T> : IEnumerable<T>, IEnumerable where T : Component | |
| { | |
| protected KdNode _root; | |
| protected KdNode _last; |
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 Unity.Collections; | |
| using Unity.Collections.LowLevel.Unsafe; | |
| using Unity.Mathematics; | |
| using UnityEngine; | |
| public class NativeMeshTest : MonoBehaviour | |
| { | |
| private NativeArray<float3> vertexBuffer; | |
| private Vector3[] vertexArray; |
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; | |
| using Unity.Collections; | |
| using Unity.Collections.LowLevel.Unsafe; | |
| using Unity.Mathematics; | |
| using UnityEngine; | |
| public class NativeMesh : IDisposable | |
| { | |
| public NativeArray<float3> VertexBuffer; | |
| public NativeArray<float3> NormalBuffer; |
- 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
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using Unity.Burst; | |
| using Unity.Collections; | |
| using Unity.Jobs; | |
| using Unity.Mathematics; | |
| using Unity.Profiling; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using UnityEngine.Rendering; |
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; | |
| public class MeshBlit : MonoBehaviour | |
| { | |
| public RenderTexture rt; | |
| public Mesh mesh; | |
| public Material material; | |
| public Vector3 meshPosition = new Vector3(0.5f, 0.5f, -1); |
