3dcg

Learn UE5 shaders

Following on from the previous Unity article, this time we want to review the UE5 shader code. UE5 allows you to read the entire source code, so first we will get the source code from github.

Until we build and run the UE5 source code

The procedure is as follows.

  • https://store.epicgames.com/ Create an EPIC account with
  • Create a GitHub account
  • Connect to GitHub from the Epic account management page (Apps and Accounts)
  • https://github.com/EpicGames/UnrealEngine Access and Clone
  • cd UnrealEngine
  • Setup.bat
  • GenerateProjectFiles.bat
  • Open UE5.sln in VisualStudio, set the startup project to “UE5”, and run Build with the Development Editor and Win64
  • Debug and run UE5

The build will take quite a while.

Learn Unity shaders

Create a sample scene

First, the latest version of Unity at this time is 6000.0.40f1, so we will use this version to examine the shader code.

Unity has three types of drawing pipelines: Build-in , URP, and HDRP. I believe that URP is currently the most commonly used, so I will create a project using URP. First, place a Plane as the floor surface of the scene, and place a Sphere on it. Then, create a new Material, set the BaseMap color to red, and apply it to the Sphere to get this screen.

Learn the basics of PBR

It has been a while since I have blogged, but today I would like to summarize my research on PBR while reading the following book.

BSDF for Raytracing

This book discusses the well-known 3DCG texture function,Bidirectional Scattering Distribution Function(BSDF), and how to implement it in ray tracing. The book covers “Lambert BRDF,” “Phong,“Blinn-Phong, “Perfect Specular, Perfect Refractive,“Torrance-Sparrow,Cook-Torrance, “GGX,” and “Disney BRDF.”

First of all, I bought this book about 2 years ago, although the title sounds difficult.

I bought the book plus the electronic version, although only the electronic version is available now. I had the book on my stack for a long time and suddenly I wanted to sort out the terminology and history of PBR.