- 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
| // ANTIALIASED PIXEL ART SAMPLING EXAMPLE | |
| //old code by Robert Cummings, thanks to Ben Golus for the original techniques + the internets etc (this isn't copyrighted code!) | |
| //all this code is considered open source - do what you want, just don't bother charging for it, share with people | |
| //each texel is a flat plateau of solid colour. | |
| //blending occurs at transition band at texel borders, sized to cover one screen pixel, no shimmer/blur/crawl etc... | |
| //this effectively turns the bilinear filter into a box filter exactly one screen pixel wide, centered on the texel boundary. | |
| //texture and sampler should use BILINEAR filtering + CLAMP or WRAP as needed, no mipmaps!!! | |
| //point filtering will NOT work | |
| //should work with on UE (custom nodes), Unity, Godot / most engines with a few tweaks |
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
| # | |
| # Unreal Engine 5.0 Python Script that takes in N >= 2 selected StaticMesh Actors, | |
| # and subtracts Actors 1..N from the first Actor | |
| # | |
| import unreal | |
| # output path and asset name (random suffix will be appended) | |
| BooleanResultBasePath = "/Game/PythonBooleanTest" | |
| BooleanResultBaseName = "PyBoolean" |
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 "Unlit/MatCap Techniques" | |
| { | |
| Properties | |
| { | |
| [NoScaleOffset] _MatCap ("MatCap", 2D) = "white" {} | |
| [KeywordEnum(ViewSpaceNormal, ViewDirectionCross, ViewDirectionAligned)] _MatCapType ("Matcap UV Type", Float) = 2 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" } |
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
| Buffer<uint> Input; | |
| RWBuffer<uint> Output; | |
| //returns the index that this value should be moved to to sort the array | |
| uint CuteSort(uint value, uint laneIndex) | |
| { | |
| uint smallerValuesMask = 0; | |
| uint equalValuesMask = ~0; | |
| //don't need to test every bit if your value is constrained to a smaller range |
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
| /* | |
| Copyright 2020 Martin Jonasson | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
| documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | |
| rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | |
| persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be |
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; | |
| // Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move. | |
| public class SmoothGameCameraMovement : MonoBehaviour | |
| { | |
| public float lateralSpeed = 0.0015f; |
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
| //Copyright (c) 2014 Tilman Schmidt (@KeyMaster_) | |
| //Permission is hereby granted, free of charge, to any person obtaining a copy | |
| //of this software and associated documentation files (the "Software"), to deal | |
| //in the Software without restriction, including without limitation the rights | |
| //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| //copies of the Software, and to permit persons to whom the Software is | |
| //furnished to do so, subject to the following conditions: | |
| //The above copyright notice and this permission notice shall be included in |
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 "hemicube.h" | |
| #define PACK_HEMICUBES 1 | |
| static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) { | |
| // Unwrapped hemicube with positive-Z in the middle. | |
| switch (index) { | |
| case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break; |
NewerOlder