Skip to content

Commit

Permalink
Falcor 4.4 (#279)
Browse files Browse the repository at this point in the history
* Falcor 4.4

Co-authored-by: skallweit <[email protected]>
  • Loading branch information
kyaoNV and skallweitNV authored Aug 5, 2021
1 parent 6252ef7 commit 5236495
Show file tree
Hide file tree
Showing 900 changed files with 27,806 additions and 9,850 deletions.
5 changes: 3 additions & 2 deletions Build/deploycommon.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ robocopy %ExtDir%\python\ %OutDir% Python36*.dll /r:0 >nul
robocopy %ExtDir%\python %OutDir%\Python /E /r:0 >nul
robocopy %ExtDir%\slang\bin\windows-x64\release %OutDir% *.dll /r:0 >nul
robocopy %ExtDir%\WinPixEventRuntime\bin\x64 %OutDir% WinPixEventRuntime.dll /r:0 >nul
robocopy "%~4\Redist\D3D\%2" %OutDir% dxil.dll /r:0 >nul
robocopy "%~4\Redist\D3D\%2" %OutDir% dxcompiler.dll /r:0 >nul
robocopy %ExtDir%\dxcompiler\bin\x64 %OutDir% dxil.dll /r:0 >nul
robocopy %ExtDir%\dxcompiler\bin\x64 %OutDir% dxcompiler.dll /r:0 >nul
robocopy %ExtDir%\Cuda\bin\ %OutDir% cudart*.dll /r:0 >nul
robocopy %ExtDir%\Cuda\bin\ %OutDir% nvrtc*.dll /r:0 >nul
robocopy %ExtDir%\Cuda\bin\ %OutDir% cublas*.dll /r:0 >nul

rem Copy NVAPI
set NvApiDir=%ExtDir%\nvapi
Expand Down
10 changes: 10 additions & 0 deletions Docs/Tutorials/01-Mogwai-Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,22 @@ Run Mogwai from within Visual Studio (by pressing Ctrl+F5), or from the command
-h, --help Display this help menu.
-s[path], --script=[path] Python script file to run.
-S[path], --scene=[path] Scene file (for example, a .pyscene
file) to open.
-l[path], --logfile=[path] File to write log into.
-v[verbosity],
--verbosity=[verbosity] Logging verbosity (0=disabled, 1=fatal
errors, 2=errors, 3=warnings, 4=infos,
5=debugging)
--silent Starts Mogwai with a minimized window
and disables mouse/keyboard input as
well as error message dialogs.
--width=[pixels] Initial window width.
--height=[pixels] Initial window height.
-c, --use-cache Use scene cache to improve scene load
times.
--rebuild-cache Rebuild the scene cache.
-d, --debug-shaders Generate shader debug info.
```

Using `--silent` together with `--script` allows to run Mogwai for rendering in the background.
Expand Down
13 changes: 7 additions & 6 deletions Docs/Usage/Scene-Formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ From assets, Falcor will import:
- Diffuse Texture
- Metal-Rough Shading Model (Default)
- RGB: Base Color
- A: Opacity (alpha)
- Spec-Gloss Shading Model (Default for OBJ only)
- RGB: Diffuse Color
- A: Opacity (alpha)
- Specular Parameters Texture
- Metal-Rough Shading Model (Default)
- R: Occlusion
- R: Occlusion (unsupported)
- G: Roughness
- B: Metallic
- Spec-Gloss Shading Model (Default for OBJ only)
- RGB: Specular Color
- A: Glossiness
- Normals Texture
- Occlusion Texture (Used for Spec-Gloss shading model only)
- Emissive Color/Texture
- Cameras
- Point lights
Expand Down Expand Up @@ -136,22 +137,22 @@ Next we need to define at least one material to use for our meshes:
```python
# Create materials
red = Material('Red')
red.baseColor = float4(0.8, 0.1, 0.1, 0)
red.baseColor = float4(0.8, 0.1, 0.1, 1.0)
red.roughness = 0.3

green = Material('Green')
green.baseColor = float4(0.1, 0.8, 0.1, 0)
green.baseColor = float4(0.1, 0.8, 0.1, 1.0)
green.roughness = 0.2
green.emissiveColor = float3(1, 1, 1)
green.emissiveFactor = 0.1

blue = Material('Blue')
blue.baseColor = float4(0.1, 0.1, 0.8, 0)
blue.baseColor = float4(0.1, 0.1, 0.8, 1.0)
blue.roughness = 0.3
blue.metallic = 1

emissive = Material('Emissive')
emissive.baseColor = float4(1, 1, 1, 0)
emissive.baseColor = float4(1, 1, 1, 1)
emissive.roughness = 0.2
emissive.emissiveColor = float3(1, 1, 1)
emissive.emissiveFactor = 20
Expand Down
9 changes: 5 additions & 4 deletions Docs/Usage/Scenes.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,17 @@ float4 main(VSOut vertexOut, float4 pixelCrd : SV_POSITION, uint triangleIndex :
### Raytracing
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.
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.
```c++
import Scene.Raytracing;
[shader("closesthit")]
void primaryClosestHit(uniform HitShaderParams hitParams, inout PrimaryRayData hitData, in BuiltInTriangleIntersectionAttributes attribs)
void primaryClosestHit(inout PrimaryRayData hitData, in BuiltInTriangleIntersectionAttributes attribs)
{
VertexData v = getVertexData(hitParams, PrimitiveIndex(), attribs);
uint materialID = gScene.getMaterialID(hitParams.getGlobalHitID());
const uint globalInstanceID = getGlobalInstanceID();
const VertexData v = getVertexData(globalInstanceID, PrimitiveIndex(), attribs);
const uint materialID = gScene.getMaterialID(globalInstanceID);
ShadingData sd = prepareShadingData(v, materialID, gScene.materials[materialID], gScene.materialResources[materialID], -WorldRayDirection(), 0);
...
}
Expand Down
Loading

0 comments on commit 5236495

Please sign in to comment.