라벨이 Unity Shader인 게시물 표시

GPU fluid

 https://github.com/PavelDoGreat/WebGL-Fluid-Simulation https://github.com/mharrys/fluids-2d https://github.com/haxiomic/GPU-Fluid-Experiments

Spatiotemporal Reservior Resampling

 https://gamehacker1999.github.io/posts/restir/ https://lab.uwa4d.com/lab/624a0c57a8103dabd0e18043 https://github.com/EmbarkStudios/kajiya/ https://developer.nvidia.com/siggraph/2020/video/sig02 https://dl.acm.org/doi/abs/10.1145/3386569.3392481 https://research.nvidia.com/sites/default/files/pubs/2020-07_Spatiotemporal-reservoir-resampling/ReSTIR.pdf https://gamehacker1999.github.io/posts/restir/ https://github.com/tatran5/Reservoir-Spatio-Temporal-Importance-Resampling-ReSTIR

Semi Transparent shadow

 https://catlikecoding.com/unity/tutorials/rendering/part-12/Rendering-12.pdf

Unity Billboard shader

  Shader "CPC_UnlitBillboard" { Properties { [Toggle]_USE_CPB("USE_CPB", Float) = 0 _TextureSample0("Texture Sample 0", 2D) = "white" {} _AlphaClipThreshold("AlphaClipThreshold", Float) = 0.1 _Color0("Color 0", Color) = (0,0,0,0) _Emission("Emission", Float) = 0 _EmissivePow("EmissivePow", Float) = 0 [Toggle]_USE_DFade_Inverse("USE_DFade_Inverse", Float) = 1 _FadeDist("FadeDist", Float) = 40 [HideInInspector] _texcoord("", 2D) = "white" {} [HideInInspector] __dirty("", Int) = 1 } SubShader { //Tags { "RenderType" = "Opaque" } Tags { "RenderType" = "TransparentCutout" "Queue" = "Transparent+0" } ...

Unity Painter Waterform

 https://github.com/EsProgram/InkPainter https://github.com/EsProgram/WaveformProvider

Unity Raytracing documents

 https://forum.unity.com/threads/wip-sdf-3-real-time-ray-tracing-distance-fields-dfao-and-soft-shadows-for-unity3d.1155401/ https://www.gsn-lib.org/apps/raytracing/index.php https://medium.com/neosavvy-labs/webgl-2-0-ray-tracing-34866baca7c1 Unity ray tracing https://github.com/langep/unity-ray-tracing-gpu-shader https://github.com/gillesferrand/Unity-RayTracing https://github.com/cdrinmatane/SSRT https://github.com/PreyK/Unity-SSRT-lighting-sample https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html LinearEyeDepth https://docs.unity3d.com/2019.3/Documentation/Manual/SL-DepthTextures.html rsqrt https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/direct3dhlsl/dx-graphics-hlsl-rsqrt.md fixed Luminance (fixed3 c) Converts color to luminance (grayscale).

Tessellation

  Unity で距離に応じたテッセレーションを行ってみた - 凹みTips (hecomi.com) http://tinkering.ee/unity/asset-unity-refractive-shader/ https://github.com/MaxwellGengYF/Unity-Tessellation-PBR-Shaders Sample A /* // // Base Classes to easy WebGL lists management // */ function myObject3D(){ var Vertices = []; var Normals = []; var Tangents = []; var TexCoords = []; var TriIndex = []; var IsEdge = []; var NbTriangles = 0; } myObject3D.prototype.Clear = function() { this.Vertices = []; this.Normals = []; this.Tangents = []; this.TexCoords = []; this.TriIndex = []; this.IsEdge = []; this.NbTriangles = 0; } myObject3D.prototype.AppendLists = function(b,lastNbOfPoints ) { for (var k=0;k<b.Vertices.length;k++){ this.Vertices.push(b.Vertices[k]); this.Normals.push(b.Normals[k]); } for (var k=0;k<b.Tangents.length;k++){ this.Tangents.push(b.Tangents[k]); } for (var k=0;k<b.TexCoords.length;k++){ this.TexCoords.push(b.TexCoords[k]); } for (var k=0;k<b.IsEdge.length;k++){ ...

Raytracing

이미지
https://reindernijhoff.net/2019/03/wolfenstein-raytracing-on-using-webgl1/ https://www.shadertoy.com/view/3dfGR2  https://github.com/Kevinsomnia/Raytracing https://github.com/keijiro/UnityDxrTest https://github.com/SIZMW/unity-raytracer https://medium.com/neosavvy-labs/webgl-2-0-ray-tracing-34866baca7c1 http://blog.three-eyed-games.com/2018/05/03/gpu-ray-tracing-in-unity-part-1/ https://github.com/kamyy/webgl-ray-tracer https://davidpeicho.github.io/blog/cloud-raymarching-walkthrough-part1/ https://codesandbox.io/s/github/sschoenholz/WebGL-Raytracer/tree/master/ https://medium.com/@evanwallace/rendering-realtime-caustics-in-webgl-2a99a29a0b2c https://www.opengl.org/pipeline/article/vol003_6/ https://github.com/evanw/webgl-water https://github.com/martinRenou/threejs-water https://github.com/shanecelis/water-demo https://github.com/ibesora/webgl-raytracer https://github.com/FoxelFox/voxel-octree Live Demo:  https://64f.de/voxel-octree-rt-v7/

frustum culling & GPU instancing examples

 https://github.com/Milk-Drinker01/Milk_Instancer01/blob/main/README.md https://github.com/miccall/Unity-GPU-Driven-Pipeline https://githubhot.com/index.php/repo/Milk-Drinker01/Milk_Instancer01 https://www.mpc-rnd.com/unity-gpu-culling-experiments/ https://github.com/ellioman/Indirect-Rendering-With-Compute-Shaders/blob/master/README.md https://github.com/ColinLeung-NiloCat/UnityURP-MobileDrawMeshInstancedIndirectExample https://youtu.be/dMreKTbQkcE https://youtu.be/e5WXx4PQXpU http://www.lighthouse3d.com/tutorials/view-frustum-culling/ https://github.com/tsherif/webgl2examples

GPU Thread compute

 https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=julie_eun1014&logNo=221116294215 1. 멀티 프로세서와 CUDA 코어 GPU의 구조는 코어 개수 * 코어 클락 으로 이루어졌습다. 따라서 GPU 코어는 CPU 코어와는 다른 구조를 가지는 것을 알 수 있습니다. CPU는 " 멀티 코어를 구성하는 전체 구성 요소 "를 뜻하고, GPU 에서는 이러한 구성 요소를  멀티 프로세서  라고 부릅니다. 멀티 프로세서 : 계산 유닛, 로드스토어 유닛 등 GPU를 구성하는 기본 요소로 구성된 최소단위. GPU는 멀티프로세서 내에 여러 개의 GPU 코어를 가지고 있음. 그 안에 계산 유닛을   GPU 코어  라고 합니다. CPU코어와 GPU 코어의 역할은 동일합니다. CPU는 하나의 칩당 멀티코어로 4~12개 정도의 코어를 가지고 있습니다. GPU는 하나의 칩에  최대 15개의 멀티 프로세서 를 가지고 있습니다. 이 멀티 프로세서는 각각 안에  192개의 코어(계산 유닛) 을 가지고 있습니다. 따라서 하나의 칩에 총 코어가 2880개 입니다. 2. Block과 Thread의 개념 GPU 내에 여러 개의 멀티 프로세서가 존재하는데, 하나의 멀티 프로세서에서 작동되는 "스레드의 모음" 을  블록 이라고 합니다. 따라서 GPU안에서 동작하는 모든 스레드의 개수는 블록 * 블록 내의 스레드 개수 입니다. 스레드는  멀티 프로세서 내에 서 작동되는 코어 하나 를  스레드 라고 합니다. 정확히는 코어 하나에 할당된 명령어입니다.. 블록과 스레드는 하드웨어와 1:n으로 매칭되기 때문에 자원이 허용되는 한 하나의 멀티 프로세서에서 여러 개의 블록을 동시에 실행시킬 수 있습니다. 그러면 스레드도 마찬가지로 여러 개를 동시에 실행시킬 수 있겠죠? 3. Kernel 실행시키기 GPU 병렬 프...

Shadow Caster

 https://cyangamedev.wordpress.com/2020/06/05/urp-shader-code/10/ Writing Shader Code for the Universal RP ShadowCaster & DepthOnly Passes If we want the shader to cast shadows, it needs a pass with the tag “LightMode”=”ShadowCaster”. This can be done on both Unlit and Lit shaders, but be aware that while they will  cast  shadows – they won’t  receive  shadows unless you handle that in the UniversalForward pass. Shaders should also include a pass tagged with “LightMode”=”DepthOnly”. This pass is very similar to the ShadowCaster, but without the shadow bias offsets. I’m not completely sure what the DepthOnly pass is used for in the URP. The Scene View seems to use it when rendering the depth texture (used by the Scene Depth node in shadergraph), while the Game View depth texture seems to work fine without this pass. There may be other things like custom render features (for the forward renderer) that rely on the DepthOnly pass though. Like with all the p...