Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
imjiangjun
pbrt-v4
提交
b8496e6a
P
pbrt-v4
项目概览
imjiangjun
/
pbrt-v4
12 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pbrt-v4
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b8496e6a
编写于
10月 28, 2021
作者:
M
Matt Pharr
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:mmp/pbrt-v4
上级
c46d179a
83d4ae16
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
19 addition
and
7998 deletion
+19
-7998
.gitmodules
.gitmodules
+3
-0
CMakeLists.txt
CMakeLists.txt
+3
-2
src/ext/filesystem
src/ext/filesystem
+1
-1
src/ext/lodepng
src/ext/lodepng
+1
-0
src/ext/lodepng/lodepng.cpp
src/ext/lodepng/lodepng.cpp
+0
-6224
src/ext/lodepng/lodepng.h
src/ext/lodepng/lodepng.h
+0
-1759
src/ext/stb
src/ext/stb
+1
-1
src/pbrt/gpu/optix.cu
src/pbrt/gpu/optix.cu
+10
-11
未找到文件。
.gitmodules
浏览文件 @
b8496e6a
...
@@ -24,3 +24,6 @@
...
@@ -24,3 +24,6 @@
[submodule "src/ext/libdeflate"]
[submodule "src/ext/libdeflate"]
path = src/ext/libdeflate
path = src/ext/libdeflate
url = https://github.com/mmp/libdeflate.git
url = https://github.com/mmp/libdeflate.git
[submodule "src/ext/lodepng"]
path = src/ext/lodepng
url = https://github.com/lvandeve/lodepng.git
CMakeLists.txt
浏览文件 @
b8496e6a
...
@@ -61,9 +61,10 @@ check_ext ("OpenEXR" "openexr/OpenEXR" 5cfb5dab6dfada731586b0281bdb15ee75e26782)
...
@@ -61,9 +61,10 @@ check_ext ("OpenEXR" "openexr/OpenEXR" 5cfb5dab6dfada731586b0281bdb15ee75e26782)
check_ext
(
"OpenVDB"
"openvdb/nanovdb"
1c306bcaf7e9f7d52525bab716202bd4f7fff5d1
)
check_ext
(
"OpenVDB"
"openvdb/nanovdb"
1c306bcaf7e9f7d52525bab716202bd4f7fff5d1
)
check_ext
(
"Ptex"
"ptex/src"
4cd8e9a6db2b06e478dfbbd8c26eb6df97f84483
)
check_ext
(
"Ptex"
"ptex/src"
4cd8e9a6db2b06e478dfbbd8c26eb6df97f84483
)
check_ext
(
"double-conversion"
"double-conversion/cmake"
cc1f75a114aca8d2af69f73a5a959aecbab0e87a
)
check_ext
(
"double-conversion"
"double-conversion/cmake"
cc1f75a114aca8d2af69f73a5a959aecbab0e87a
)
check_ext
(
"filesystem"
"filesystem/filesystem"
f45da753728cde9b1c380b343e41c8b1ca6498d7
)
check_ext
(
"filesystem"
"filesystem/filesystem"
c5f9de30142453eb3c6fe991e82dfc2583373116
)
check_ext
(
"libdeflate"
"libdeflate/common"
1fd0bea6ca2073c68493632dafc4b1ddda1bcbc3
)
check_ext
(
"libdeflate"
"libdeflate/common"
1fd0bea6ca2073c68493632dafc4b1ddda1bcbc3
)
check_ext
(
"stb"
"stb/tools"
b42009b3b9d4ca35bc703f5310eedc74f584be58
)
check_ext
(
"lodepng"
"lodepng/examples"
8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a
)
check_ext
(
"stb"
"stb/tools"
af1a5bc352164740c1cc1354942b1c6b72eacb8a
)
check_ext
(
"zlib"
"zlib/doc"
54d591eabf9fe0e84c725638f8d5d8d202a093fa
)
check_ext
(
"zlib"
"zlib/doc"
54d591eabf9fe0e84c725638f8d5d8d202a093fa
)
add_compile_definitions
(
"$<$<CONFIG:DEBUG>:PBRT_DEBUG_BUILD>"
)
add_compile_definitions
(
"$<$<CONFIG:DEBUG>:PBRT_DEBUG_BUILD>"
)
...
...
filesystem
@
c5f9de30
比较
f45da753
...
c5f9de30
Subproject commit
f45da753728cde9b1c380b343e41c8b1ca6498d7
Subproject commit
c5f9de30142453eb3c6fe991e82dfc2583373116
lodepng
@
8c6a9e30
Subproject commit 8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a
src/ext/lodepng/lodepng.cpp
已删除
100644 → 0
浏览文件 @
c46d179a
此差异已折叠。
点击以展开。
src/ext/lodepng/lodepng.h
已删除
100644 → 0
浏览文件 @
c46d179a
此差异已折叠。
点击以展开。
stb
@
af1a5bc3
比较
b42009b3
...
af1a5bc3
Subproject commit
b42009b3b9d4ca35bc703f5310eedc74f584be58
Subproject commit
af1a5bc352164740c1cc1354942b1c6b72eacb8a
src/pbrt/gpu/optix.cu
浏览文件 @
b8496e6a
...
@@ -58,10 +58,12 @@ static __forceinline__ __device__ T *getPayload() {
...
@@ -58,10 +58,12 @@ static __forceinline__ __device__ T *getPayload() {
}
}
template
<
typename
...
Args
>
template
<
typename
...
Args
>
__device__
inline
void
Trace
(
OptixTraversableHandle
traversable
,
Ray
ray
,
Float
tMin
,
__device__
inline
void
Trace
(
OptixTraversableHandle
traversable
,
Ray
ray
,
Float
tMax
,
OptixRayFlags
flags
,
Args
&&
...
payload
)
{
Float
tMax
,
OptixRayFlags
flags
,
Args
&&
...
payload
)
{
static
constexpr
float
eps
=
1e-7
f
;
optixTrace
(
traversable
,
make_float3
(
ray
.
o
.
x
,
ray
.
o
.
y
,
ray
.
o
.
z
),
optixTrace
(
traversable
,
make_float3
(
ray
.
o
.
x
,
ray
.
o
.
y
,
ray
.
o
.
z
),
make_float3
(
ray
.
d
.
x
,
ray
.
d
.
y
,
ray
.
d
.
z
),
tMin
,
tMax
,
ray
.
time
,
make_float3
(
ray
.
d
.
x
,
ray
.
d
.
y
,
ray
.
d
.
z
),
eps
,
tMax
,
ray
.
time
,
OptixVisibilityMask
(
255
),
flags
,
0
,
/* ray type */
OptixVisibilityMask
(
255
),
flags
,
0
,
/* ray type */
1
,
/* number of ray types */
1
,
/* number of ray types */
0
,
/* missSBTIndex */
0
,
/* missSBTIndex */
...
@@ -110,8 +112,7 @@ extern "C" __global__ void __raygen__findClosest() {
...
@@ -110,8 +112,7 @@ extern "C" __global__ void __raygen__findClosest() {
ray
.
d
.
y
,
ray
.
d
.
z
,
tMax
);
ray
.
d
.
y
,
ray
.
d
.
z
,
tMax
);
uint32_t
missed
=
0
;
uint32_t
missed
=
0
;
Trace
(
params
.
traversable
,
ray
,
1e-5
f
/* tMin */
,
tMax
,
OPTIX_RAY_FLAG_NONE
,
p0
,
p1
,
Trace
(
params
.
traversable
,
ray
,
tMax
,
OPTIX_RAY_FLAG_NONE
,
p0
,
p1
,
missed
);
missed
);
if
(
missed
)
if
(
missed
)
EnqueueWorkAfterMiss
(
r
,
params
.
mediumSampleQueue
,
params
.
escapedRayQueue
);
EnqueueWorkAfterMiss
(
r
,
params
.
mediumSampleQueue
,
params
.
escapedRayQueue
);
...
@@ -255,8 +256,7 @@ extern "C" __global__ void __raygen__shadow() {
...
@@ -255,8 +256,7 @@ extern "C" __global__ void __raygen__shadow() {
sr
.
ray
.
d
.
x
,
sr
.
ray
.
d
.
y
,
sr
.
ray
.
d
.
z
);
sr
.
ray
.
d
.
x
,
sr
.
ray
.
d
.
y
,
sr
.
ray
.
d
.
z
);
uint32_t
missed
=
0
;
uint32_t
missed
=
0
;
Trace
(
params
.
traversable
,
sr
.
ray
,
1e-5
f
/* tMin */
,
sr
.
tMax
,
OPTIX_RAY_FLAG_NONE
,
Trace
(
params
.
traversable
,
sr
.
ray
,
sr
.
tMax
,
OPTIX_RAY_FLAG_NONE
,
missed
);
missed
);
RecordShadowRayResult
(
sr
,
&
params
.
pixelSampleState
,
!
missed
);
RecordShadowRayResult
(
sr
,
&
params
.
pixelSampleState
,
!
missed
);
}
}
...
@@ -282,8 +282,7 @@ extern "C" __global__ void __raygen__shadow_Tr() {
...
@@ -282,8 +282,7 @@ extern "C" __global__ void __raygen__shadow_Tr() {
uint32_t
missed
=
0
;
uint32_t
missed
=
0
;
Trace
(
params
.
traversable
,
ray
,
1e-5
f
/* tMin */
,
tMax
,
OPTIX_RAY_FLAG_NONE
,
p0
,
Trace
(
params
.
traversable
,
ray
,
tMax
,
OPTIX_RAY_FLAG_NONE
,
p0
,
p1
,
missed
);
p1
,
missed
);
return
TransmittanceTraceResult
{
!
missed
,
Point3f
(
ctx
.
piHit
),
ctx
.
material
};
return
TransmittanceTraceResult
{
!
missed
,
Point3f
(
ctx
.
piHit
),
ctx
.
material
};
},
},
...
@@ -491,9 +490,9 @@ extern "C" __global__ void __raygen__randomHit() {
...
@@ -491,9 +490,9 @@ extern "C" __global__ void __raygen__randomHit() {
PBRT_DBG
(
"Randomhit raygen ray.o %f %f %f ray.d %f %f %f
\n
"
,
ray
.
o
.
x
,
ray
.
o
.
y
,
PBRT_DBG
(
"Randomhit raygen ray.o %f %f %f ray.d %f %f %f
\n
"
,
ray
.
o
.
x
,
ray
.
o
.
y
,
ray
.
o
.
z
,
ray
.
d
.
x
,
ray
.
d
.
y
,
ray
.
d
.
z
);
ray
.
o
.
z
,
ray
.
d
.
x
,
ray
.
d
.
y
,
ray
.
d
.
z
);
while
(
true
)
{
int
depth
=
0
;
Trace
(
params
.
traversable
,
ray
,
0.
f
/* tMin */
,
1.
f
/* tMax */
,
while
(
LengthSquared
(
ray
.
d
)
>
0
&&
++
depth
<
100
)
{
OPTIX_RAY_FLAG_NONE
,
ptr0
,
ptr1
);
Trace
(
params
.
traversable
,
ray
,
1.
f
/* tMax */
,
OPTIX_RAY_FLAG_NONE
,
ptr0
,
ptr1
);
if
(
payload
.
intr
)
{
if
(
payload
.
intr
)
{
ray
=
payload
.
intr
->
SpawnRayTo
(
s
.
p1
);
ray
=
payload
.
intr
->
SpawnRayTo
(
s
.
p1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录