- 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
| // LICENSE | |
| // ======= | |
| // Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved. | |
| // ------- | |
| // 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 all copies or substantial portions of the |
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; | |
| using UnityEditor.ShaderGraph; | |
| using System.Reflection; | |
| [Title("Distance", "Triangle")] | |
| public class TriangleNode : CodeFunctionNode | |
| { | |
| public TriangleNode() |
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
| struct Vertex { | |
| vec3 value; | |
| vec3 directionalDerivativeU; | |
| vec3 directionalDerivativeV; | |
| }; | |
| void AmbientDice::hybridCubicBezierWeights(u32 i0, u32 i1, u32 i2, float b0, float b1, float b2, VertexWeights *w0Out, VertexWeights *w1Out, VertexWeights *w2Out) const { | |
| const float alpha = 0.5f * sqrt(0.5f * (5.0f + sqrt(5.0f))); // 0.9510565163 | |
| const float beta = -0.5f * sqrt(0.1f * (5.0f + sqrt(5.0f))); // -0.4253254042 | |
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
| // Mostly code from https://github.com/ampas/aces-dev | |
| Vec3 ACES_RRT( Vec3 aces ) | |
| { | |
| // --- Glow module --- // | |
| float saturation = rgb_2_saturation( aces); | |
| float ycIn = rgb_2_yc( aces); | |
| float s = sigmoid_shaper( (saturation - 0.4f) / 0.2f); | |
| float addedGlow = 1.0f + glow_fwd( ycIn, RRT_GLOW_GAIN * s, RRT_GLOW_MID); |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
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
| // NOTE: Must bind 8x single mip RWTexture views, because HLSL doesn't have .mips member for RWTexture2D. (SRVs only have .mips member) | |
| // NOTE: globallycoherent attribute is needed. Without it writes aren't guaranteed to be seen by other groups | |
| globallycoherent RWTexture2D<float> MipTextures[8]; | |
| RWTexture2D<uint> Counters[8]; | |
| groupshared uint CounterReturnLDS; | |
| [numthreads(16, 16, 1)] | |
| void GenerateMipPyramid(uint3 Tid : SV_DispatchThreadID, uint3 Group : SV_GroupId, uint Gix : SV_GroupIndex) | |
| { | |
| [unroll] |
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 "Distortion" | |
| { | |
| Properties | |
| { | |
| _Refraction ("Refraction", Range (0.00, 10.0)) = 1.0 | |
| _Power ("Power", Range (1.00, 10.0)) = 1.0 | |
| _AlphaPower ("Vertex Alpha Power", Range (1.00, 10.0)) = 1.0 | |
| _BumpMap( "Normal Map", 2D ) = "bump" {} | |
| _Cull ( "Face Culling", Int ) = 2 |
