当前位置:网站首页>Project training of Software College of Shandong University rendering engine system basic renderer (IV)
Project training of Software College of Shandong University rendering engine system basic renderer (IV)
2022-06-12 15:51:00 【chenxiang_ two hundred thousand one hundred and eight】
< Project training of Software College of Shandong University > Rendering engine system —— Base renderer ( Four )
Preface
This project hopes to implement a basic renderer , At the same time, it can support the use of precomputing . This article focuses on PathTracer Specific code .
Project address
One 、 Basic logic
Based on the idea of basic path tracking : To calculate the contribution of the path corresponding to each pixel , We first initialize the path . Depending on the corresponding pixel from VBuffer After reading the hit point information in , For this hit point , We first calculate the contribution of direct illumination . Because we support multiple importance sampling , So we need to sample the light source when calculating the direct illumination contribution , For different light sources , We distinguish between different ways of calculating contributions , This contribution is then superimposed on this ray result . Of course , If the sampled light source does not actually contribute to the hit point , Then we will ignore it .
After calculating the contribution of direct illumination , We generate and track scattered rays , The direction of the light is determined by BRDF Sampling acquisition of . For tracking the hit results , We saved it . If we don't hit the object in the scene , Then we sample the ambient light directly and add its contribution to the path . If we hit , Then update the current path throughput, After that, take the new hit point as the starting point to continue the tracking similar to the above .
Two 、 Main function code
1、 Define resources in the header file

2、Pass Structure and resources
This part is related to VBuffer similar , Quantity only 、 And so on , No more specific display code .
3、Shader Track the path within

summary
It mainly shows PathTracer The main code of function realization , However, there is no specific path tracking implementation code , The specific path tracking process will be shown later .
边栏推荐
- CUDA out of memory or brokenpipeerror: [errno 32] broken pipe or oserror: [winerror 1455] solution to the problem that the page file is too small
- Servlet connects to database to realize user login function
- Broadcast and multicast (tcp/ip details volume 1/2)
- nohup 命令使用
- Dart typedef的理解
- 第一章 线性表
- Idea大全(转载)
- 【光源实用案例】 UV-LED固化创新,让产线变得更丝滑
- CUDA out of memory 或 BrokenPipeError: [Errno 32] Broken pipe 或 OSError: [WinError 1455] 页面文件太小的解决办法
- ER diagram made by StarUML based on the last student achievement management system
猜你喜欢

RARP总结(TCP/IP详解卷1/2)

Understanding of dart typedef

The difference between TCP and UDP, the three handshakes of TCP and the four waves of TCP

Broadcast and multicast (tcp/ip details volume 1/2)

Dart typedef的理解

Great God cracked the AMD k6-2+ processor 22 years ago and opened the hidden 128KB L2 cache

Five models of software testing

org. xml. sax. SAXParseException; lineNumber: 63; columnNumber: 10; The definition of "mapper" in the related type must be matched with "(CAC

Deepin20.6 RTX3080 安裝顯卡驅動510.60.02、CUDA11.6、PyTorch1.11

Apache Kylin 历险记
随机推荐
UDP summary (tcp/ip details volume 1/2)
UE4 常用类型转换
Step by step to create a trial version of ABAP program containing custom screen
C language partition bin file program
Servlet knowledge explanation (2)
go net库(待续)
[jvm learning] types of GC and allocation process of objects on JVM heap
Servlet连接数据库实现用户登录功能
Difference between tinyint and int
任务 水果炸汁机 0611
File uploading and downloading in SSM
[automation] kolla Based Automated Deployment CEPH cluster
为什么阿里巴巴不建议MySQL使用Text类型?
How to use grafana to easily realize OVL data visualization
Explore the Apache shardingsphere SQL parse format function
Two implementation methods of generic interface
2021-06-27
CUDA out of memory 或 BrokenPipeError: [Errno 32] Broken pipe 或 OSError: [WinError 1455] 页面文件太小的解决办法
如何使用Grafana轻松实现OVL数据可视化
Servlet connects to database to realize user login function