当前位置:网站首页>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 .
边栏推荐
- 远程操控其它电脑--详细教程
- Task output: dense snow ice city theme song 0612
- 第一章 线性表
- < 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(七)
- Method reference instance method reference
- Summary of advantages and disadvantages of various architectures
- RARP summary (tcp/ip explanation volume 1/2)
- Change according to the situation, the road to promotion in the second half of 2022
- Fiddler packet capturing (mobile app)
- From K-means to capsule
猜你喜欢

Explore the Apache shardingsphere SQL parse format function

Microservice fault tolerance

小飞页升级变智能修复Bug更快速了

Jupyter notebook new environment shortcut

redis String类型常见命令

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

远程操控其它电脑--详细教程

Multi thread knowledge induction

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

Golang collaboration scheduling (I): Collaboration Status
随机推荐
< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(四)
What is reflection-- The soul of frame design
Job submission instructions upload jobs to network disk
小飞页升级变智能修复Bug更快速了
SOA Architecture
Classification of annotations
如何使用Grafana轻松实现OVL数据可视化
[jvm learning] types of GC and allocation process of objects on JVM heap
Solving multithreading security problems
虚拟机中用户和root忘记密码解决办法
当编程纳入到高考。。。
Raccourci vers le nouvel environnement du carnet de notes Jupiter
第一章 线性表
jupyter notebook新環境快捷方式
作业提交说明 上传作业到网盘中
Jupyter notebook new environment shortcut
Data analysis | kmeans data analysis
同源?跨域?如何解决跨域?
Deepin20.6 rtx3080 installer le lecteur de carte graphique 510.60.02, cuda 11.6, pytorch1.11
File uploading and downloading in SSM