Skip to content

Commit 5236495

Browse files
kyaoNVskallweitNV
andauthored
Falcor 4.4 (#279)
* Falcor 4.4 Co-authored-by: skallweit <[email protected]>
1 parent 6252ef7 commit 5236495

File tree

900 files changed

+27806
-9850
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

900 files changed

+27806
-9850
lines changed

Build/deploycommon.bat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ robocopy %ExtDir%\python\ %OutDir% Python36*.dll /r:0 >nul
3333
robocopy %ExtDir%\python %OutDir%\Python /E /r:0 >nul
3434
robocopy %ExtDir%\slang\bin\windows-x64\release %OutDir% *.dll /r:0 >nul
3535
robocopy %ExtDir%\WinPixEventRuntime\bin\x64 %OutDir% WinPixEventRuntime.dll /r:0 >nul
36-
robocopy "%~4\Redist\D3D\%2" %OutDir% dxil.dll /r:0 >nul
37-
robocopy "%~4\Redist\D3D\%2" %OutDir% dxcompiler.dll /r:0 >nul
36+
robocopy %ExtDir%\dxcompiler\bin\x64 %OutDir% dxil.dll /r:0 >nul
37+
robocopy %ExtDir%\dxcompiler\bin\x64 %OutDir% dxcompiler.dll /r:0 >nul
3838
robocopy %ExtDir%\Cuda\bin\ %OutDir% cudart*.dll /r:0 >nul
3939
robocopy %ExtDir%\Cuda\bin\ %OutDir% nvrtc*.dll /r:0 >nul
40+
robocopy %ExtDir%\Cuda\bin\ %OutDir% cublas*.dll /r:0 >nul
4041

4142
rem Copy NVAPI
4243
set NvApiDir=%ExtDir%\nvapi

Docs/Tutorials/01-Mogwai-Usage.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,22 @@ Run Mogwai from within Visual Studio (by pressing Ctrl+F5), or from the command
2525
2626
-h, --help Display this help menu.
2727
-s[path], --script=[path] Python script file to run.
28+
-S[path], --scene=[path] Scene file (for example, a .pyscene
29+
file) to open.
2830
-l[path], --logfile=[path] File to write log into.
31+
-v[verbosity],
32+
--verbosity=[verbosity] Logging verbosity (0=disabled, 1=fatal
33+
errors, 2=errors, 3=warnings, 4=infos,
34+
5=debugging)
2935
--silent Starts Mogwai with a minimized window
3036
and disables mouse/keyboard input as
3137
well as error message dialogs.
3238
--width=[pixels] Initial window width.
3339
--height=[pixels] Initial window height.
40+
-c, --use-cache Use scene cache to improve scene load
41+
times.
42+
--rebuild-cache Rebuild the scene cache.
43+
-d, --debug-shaders Generate shader debug info.
3444
```
3545

3646
Using `--silent` together with `--script` allows to run Mogwai for rendering in the background.

Docs/Usage/Scene-Formats.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@ From assets, Falcor will import:
1313
- Diffuse Texture
1414
- Metal-Rough Shading Model (Default)
1515
- RGB: Base Color
16+
- A: Opacity (alpha)
1617
- Spec-Gloss Shading Model (Default for OBJ only)
1718
- RGB: Diffuse Color
19+
- A: Opacity (alpha)
1820
- Specular Parameters Texture
1921
- Metal-Rough Shading Model (Default)
20-
- R: Occlusion
22+
- R: Occlusion (unsupported)
2123
- G: Roughness
2224
- B: Metallic
2325
- Spec-Gloss Shading Model (Default for OBJ only)
2426
- RGB: Specular Color
2527
- A: Glossiness
2628
- Normals Texture
27-
- Occlusion Texture (Used for Spec-Gloss shading model only)
2829
- Emissive Color/Texture
2930
- Cameras
3031
- Point lights
@@ -136,22 +137,22 @@ Next we need to define at least one material to use for our meshes:
136137
```python
137138
# Create materials
138139
red = Material('Red')
139-
red.baseColor = float4(0.8, 0.1, 0.1, 0)
140+
red.baseColor = float4(0.8, 0.1, 0.1, 1.0)
140141
red.roughness = 0.3
141142

142143
green = Material('Green')
143-
green.baseColor = float4(0.1, 0.8, 0.1, 0)
144+
green.baseColor = float4(0.1, 0.8, 0.1, 1.0)
144145
green.roughness = 0.2
145146
green.emissiveColor = float3(1, 1, 1)
146147
green.emissiveFactor = 0.1
147148

148149
blue = Material('Blue')
149-
blue.baseColor = float4(0.1, 0.1, 0.8, 0)
150+
blue.baseColor = float4(0.1, 0.1, 0.8, 1.0)
150151
blue.roughness = 0.3
151152
blue.metallic = 1
152153

153154
emissive = Material('Emissive')
154-
emissive.baseColor = float4(1, 1, 1, 0)
155+
emissive.baseColor = float4(1, 1, 1, 1)
155156
emissive.roughness = 0.2
156157
emissive.emissiveColor = float3(1, 1, 1)
157158
emissive.emissiveFactor = 20

Docs/Usage/Scenes.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,17 @@ float4 main(VSOut vertexOut, float4 pixelCrd : SV_POSITION, uint triangleIndex :
138138
139139
### Raytracing
140140
141-
Use the helper function in `Scene/Raytracing.slang` called `uint getGlobalHitID()` to calculate the equivalent of what `meshInstanceID` would be in raster, which can be used in the same way to look up geometry and material data.
141+
Use the helper function in `Scene/Raytracing.slang` called `getGlobalInstanceID()` to calculate the equivalent of what `meshInstanceID` would be in raster, which can be used in the same way to look up geometry and material data.
142142
143143
```c++
144144
import Scene.Raytracing;
145145
146146
[shader("closesthit")]
147-
void primaryClosestHit(uniform HitShaderParams hitParams, inout PrimaryRayData hitData, in BuiltInTriangleIntersectionAttributes attribs)
147+
void primaryClosestHit(inout PrimaryRayData hitData, in BuiltInTriangleIntersectionAttributes attribs)
148148
{
149-
VertexData v = getVertexData(hitParams, PrimitiveIndex(), attribs);
150-
uint materialID = gScene.getMaterialID(hitParams.getGlobalHitID());
149+
const uint globalInstanceID = getGlobalInstanceID();
150+
const VertexData v = getVertexData(globalInstanceID, PrimitiveIndex(), attribs);
151+
const uint materialID = gScene.getMaterialID(globalInstanceID);
151152
ShadingData sd = prepareShadingData(v, materialID, gScene.materials[materialID], gScene.materialResources[materialID], -WorldRayDirection(), 0);
152153
...
153154
}

0 commit comments

Comments
 (0)