GithubHelp home page GithubHelp logo

nvidiagameworks / falcor Goto Github PK

View Code? Open in Web Editor NEW
2.5K 2.5K 461.0 26.04 MB

Real-Time Rendering Framework

Home Page: https://developer.nvidia.com/falcor

License: Other

Batchfile 0.27% C++ 90.29% C 0.81% Python 6.63% PowerShell 0.29% Shell 0.16% Cuda 0.04% CSS 0.01% Smarty 0.09% HLSL 0.32% CMake 1.10%

falcor's People

Contributors

ashwinnv avatar benaryorg avatar clavellenv avatar germanaizek avatar guoxx avatar halldorfannar avatar jancsikdominik avatar kyaonv avatar moakesnv avatar msgfx avatar nbentynv avatar pierremoreau avatar saltfishmx avatar shill-lucasfilm avatar skallweitnv avatar snosixtyboo avatar swordigo1995 avatar tangent-vector avatar udemegane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

falcor's Issues

Falcor build failed with VS 2015

Using a fresh clone of Falcor and VS 2015 I am seeing the following build errors:

1> Package successfully installed to D:\packman-repo\chk\vulkansdk\1.0.51.0
1> Package 'slang' at version '0.9.5' is missing from local storage.
1> Traceback (most recent call last):
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 967, in
1> main()
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 948, in main
1> return args.func(**vars(args))
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 419, in pull_cmd
1> variable_file)
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 453, in pull_with_variable_file
1> pull_dependencies(deps, remote_configs, remote_names, platform, postscript, variable_file)
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 528, in pull_dependencies
1> package_path = tp[remote_name].get_package_path(package_name, package_version)
1> File "D:\packman-repo\packman-common\5.1\transport\httptransport.py", line 35, in get_package_path
1> if self.is_file_found(path):
1> File "D:\packman-repo\packman-common\5.1\transport\httptransport.py", line 25, in is_file_found
1> r = requests.head(protocol_and_path)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\api.py", line 95, in head
1> return request('head', url, **kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\api.py", line 50, in request
1> response = session.request(method=method, url=url, **kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\sessions.py", line 465, in request
1> resp = self.send(prep, **send_kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\sessions.py", line 573, in send
1> r = adapter.send(request, **kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\adapters.py", line 431, in send
1> raise SSLError(e, request=request)
1> botocore.vendored.requests.exceptions.SSLError: [Errno 1] _ssl.c:507: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073: The command "call D:\Programming\Falcor\Framework\Source\..\BuildScripts\prebuild.bat D:\Programming\Falcor\Framework\Source\..\ D:\Programming\Falcor\ D:\Programming\Falcor\Framework\Source\ x64 x64 DebugD3D12 D:\Programming\Falcor\Bin\Int\x64\DebugD3D12\Lib
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073:
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073: :VCEnd" exited with code 1.

Then later on:

9>------ Rebuild All started: Project: ModelViewer, Configuration: Debug x64 ------
2> Shadows.cpp
5> ShaderBuffers.cpp
3> MultiPassPostProcess.cpp
7> SimpleDeferred.cpp
4> ProjectTemplate.cpp
9> ModelViewer.cpp
6> ShaderToy.cpp
8> StereoRendering.cpp
5>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
2>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
6>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
3>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
8>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
10>------ Rebuild All started: Project: SceneEditor, Configuration: Debug x64 ------
7>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
9>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory
11>------ Rebuild All started: Project: EnvMap, Configuration: Debug x64 ------
12>------ Rebuild All started: Project: NormalMapFiltering, Configuration: Debug x64 ------
4>d:\programming\falcor\framework\source\graphics\program\programreflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory

Compile error when Windows language is Chinese

I am using Windows 10 with my OS code page set to 936. When compiling Falcor I got the following error message from msvc:

d:\git_repo\falcornv\falcor\framework\externals\ffmpeg\include\libavutil\rational.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file Utils\Video\VideoEncoder.cpp)

Because treat warnings as errors is turned on, I cannot get Falcor to compile due to this error message. Save the file as UTF8 does not solve the issue, and I cannot locate the offending characater in rational.h.

The workaround is to suppress warning 4819 in project settings. (using pragma in rational.h does not work)

Compile fails on Ubuntu 18.04

Compile fails with the following error:

Processing project file '/home/nan/p/Falcor/dependencies.xml'
Framework/Source//ArgList.cpp
Framework/Source//ArgList.cpp: In function ‘std::__cxx11::string Falcor::readToken(std::stringstream&)’:
Framework/Source//ArgList.cpp:19:17: error: ‘count’ is not a member of ‘std’
             if (std::count(token.begin(), token.end(), '"') % 2)

Documentation

Hi folks,

Falcor is a really awesome piece of software. I just came across it, and I find it really impressive. Thank you so much for all the work you're doing.

So, Github projects can have Wikis. I'm wondering if there are plans to write some introductory documentation for using the framework. I know there is a samples folder with some code in it (it's much appreciated), but I think that some basic docs would go a long way to help some of us get going. I understand that this framework is aimed at the professional graphics programmer, and that they might be familiar with the general concepts of this type of framework. However, some developers (like myself) are graphic scrubs who don't have much experience with frameworks like Falcor. It would be nice if us scrubs had a chance to hack on Falcor, too.

I think one of the main benefits of introductory documentation is to take away the feeling of doubt that we might have about whether we're using the framework in a sane way. That is, sometimes, getting something working is not good enough because you might not know if it's built on a house of cards; maybe the code looks like it's working, but it's a timebomb waiting to explode. Some basic intro documentation would help give us confidence, which could translate into code throughput (and thus more idea throughput), because we know we're going about coding the right way. This will help us transition out of the noob phase in less time.

So, from a scrub's perspective, these are some things that I would appreciate to have:

  • A few words about the main systems in the framework, and how they interact with each other.
  • Things to keep in mind for writing performant code. Maybe some do's and dont's.
  • A set of super-basic code examples, with comments in the code. They could be placed in the Samples folder, within a folder named 'StartHere' (or something like that), to make it super obvious. Roughtly, in this order of difficulty:
    1. Hello World Triangle.
    2. Loading a texture into a quad.
    3. Animating the properties of a textured quad (translation, rotation, scale, etc).
    4. An animated texture where the frames of the animation come from an image atlas. This can be used to add detail to a scene without dealing with meshes. Many times, for demos, that's all you need. Think of billboarding background people, off in a distance.
    5. Working with the scene camera.
    6. Quering the scene graph to locate nodes.
    7. Applying some post process effects to a scene.
    8. Loading a simple model (no bones, textures, child nodes, etc) and manipulating some of its properties (translation, rotation, etc).
    9. Loading a textured model that has child nodes, and manipulating those child nodes.
    10. Loading multiple models that have bones and manipulating them via the bones.

The documentation need not be all written in one sitting -- wikis are designed to grow over time. If you (Nv devs) get the ball rolling, it will probably inspire others to fill in the Wiki, too.

Thank you, again, for the wonderful work that you're doing. In time, I hope to learn the framework really well such that I can contribute in possitive manner, hopefully over years to come.

Regards,
Vlad F.

don't update dependencies

error connection aborted.
File "X:\packman-repo\packman-common\5.2.4\site-packages\s3transfer-0.1.11\s3transfer\futures.py", line 233, in result raise self._exception botocore.vendored.requests.exceptions.ConnectionError: ('Connection aborted.', error(10061, '\xcf\xee\xe4\xea\xeb\xfe\xf7\xe5\xed\xe8\xe5 \xed\xe5 \xf3\xf1\xf2\xe0\xed\xee\xe2\xeb\xe5\xed\xee,'))

Feature Request: DLL build of Falcor

Are there any plans for supporting a DLL build of Falcor ?

I want to do hot reloading of render loop code, so there is no need to shut down the application every time some c++ code inside the render loop is changed, as loading whole models and scene is somewhat slow, especially the ORCA scenes.
My setup is an application which has holds the Falcor::Renderer instance and is handling rendering code dll hot reloading. It is forwarding onFrameRender and onGuiRender calls to the rendering code DLL.
There is a DLL which holds function for initializing some state, and onFrameRender and onGuiRender calls which implement the main render logic.

The problem right now is Falcor is statically build and contains some globals which are not properly initialized in the DLL due to not having a Renderer instance. Also there is a duplication of all of the code that way. Having Falcor built as DLL will solve this problems and enable this workflow with hot reloading rendering code.

Vulkan samples crash when a 1920x1080 window can't be created

I often run Falcor on a screen that is only 1920x1080, and as a result all of my Falcor windows get created at a size slightly smaller than that. This seems to not cause problems on D3D12 (at least not any more), but when running with Vulkan I get errors and can't run the samples.

constant buffer not uploaded to GPU

I have a buffer of data and I want to set it to a constant buffer. my code is like the following:

		Falcor::ConstantBuffer::SharedPtr const_buf = pVars->getConstantBuffer(buffer->name.get());
		const_buf->updateData(buffer->data, 0, buffer->size);

but when I call this function

    bool VariablesBuffer::uploadToGPU(size_t offset, size_t size)
    {
        if(mDirty == false)
        {
            return false;
        }

I found mDirty is always false, so the data will never uploaded to GPU

error by calling updateSubresourceData

when I call updateSubresourceData(texture,0,data,uvec3(11, 2, 0),uvec3(7, 7, 1)), an error popped up.

D3D12 ERROR: ID3D12CommandList::CopyTextureRegion: D3D12_SUBRESOURCE_FOOTPRINT::RowPitch must be a multiple of 256 (aka. D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) and greater or equal to the pitch implied by the width. RowPitch is 28, and must be greater or equal to 28 when D3D12_SUBRESOURCE_FOOTPRINT::Width is 7 and D3D12_SUBRESOURCE_FOOTPRINT::Format is R8G8B8A8_UNORM. [ RESOURCE_MANIPULATION ERROR #868: COPYTEXTUREREGION_INVALIDSRCROWPITCH]

The texture is 2d texture 256*256 with format RGBA8 Unorm.

Have trouble building with spaces in user folder path

Unfortunately my Windows user folder happened to be "C:\Users\Andrew Huang", with a SPACE in it.

So when I compiled the solution in VS2017, it failed.

Here is the log.

1>------ Build started: Project: Falcor, Configuration: DebugD3D12 x64 ------
1>Fetching [email protected] from s3 ...
1>Connecting to S3 ...
1>Downloading ...
1>Error connecting to S3!
1>System.Management.Automation.MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "Access to the path 'C:\Users\Andrew' is denied." ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\Andrew' is denied.
1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
1>   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
1>   at System.IO.FileStream..ctor(String path, FileMode mode)
1>   --- End of inner exception stack trace ---
1>   at System.Management.Automation.DotNetAdapter.AuxiliaryConstructorInvoke(MethodInformation methodInformation, Object[] arguments, Object[] originalArguments)
1>   at System.Management.Automation.DotNetAdapter.InvokeResolvedConstructor(MethodInformation bestMethod, Object[] newArguments, Object[] arguments)
1>   at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[] constructors, Object[] arguments)
1>   at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[] constructors, Object[] args)

Oh, and I've installed the python module for VS2017. So it puzzles me why I have to download a python 2.7 again.

Optimize descriptor pools/heap memory usage

Vulkan memory allocation policy seems to be different then DX12. It appears that DX12 lazily allocates memory for the QueryHeap, while VK allocates on request. There are 2 issues:

  1. Running the FeatureDemo on Vulkan consumes 800MB. DX Consumes about 200MB. Need to figure out where the difference is coming from.
  2. We should start with smaller heaps/set sizes and reallocate when we are out of the space (that should be straightforward)

GLM compile fails on Ubuntu 18.04

The reason it fails is because g++ 7.3 is not a known compiler for the GLM version that packman downloads (0.9.8.5). It seems to be fixed in the latest
Overwriting the file from link above can be used as a temporary workaround. Overall, the GLM should be updated to a version that doesn't explicitly checks for GCC minor version to fix it.
Someone with a bit more time can look here to figure this out.

warning by calling clearFbo

when I call clearFbo with following arguments
RenderContext()->clearFbo(contex->getGraphicsState()->getFbo().get(), glm::vec4(0), 1.0f, 0, Falcor::FboAttachmentType::Depth| Falcor::FboAttachmentType::Stencil);

I got the warning in every frame rendering:
D3D12 WARNING: ID3D12CommandList::ClearDepthStencilView: The application did not pass any clear value to resource creation. The clear operation is typically slower as a result; but will still clear to the desired value. [ EXECUTION WARNING #821: CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE]

"No context API selected"

Using the Linux Build instructions.
(dependencies installed, downloaded vulkan SDK, set up the vulkan env.)
set SAMPLE_CONFIG to Debug.
executed 'make Debug'

On Ubuntu, using libglfw3-dev version 3.1.2-3

...
Framework/Source//SampleTest.cpp
Framework/Source//MultiRendererSample.cpp
Framework/Source//Sample.cpp
Framework/Source//ArgList.cpp
Framework/Source/API/GpuTimer.cpp
Framework/Source/API/Formats.cpp
Framework/Source/API/ComputeContext.cpp
Framework/Source/API/TypedBuffer.cpp
Framework/Source/API/VAO.cpp
Framework/Source/API/BlendState.cpp
Framework/Source/API/Sampler.cpp
Framework/Source/API/RenderContext.cpp
Framework/Source/API/FBO.cpp
Framework/Source/API/CopyContext.cpp
Framework/Source/API/Texture.cpp
Framework/Source/API/ConstantBuffer.cpp
Framework/Source/API/Resource.cpp
Framework/Source/API/DescriptorSet.cpp
Framework/Source/API/StructuredBuffer.cpp
Framework/Source/API/Device.cpp
Framework/Source/API/ResourceViews.cpp
Framework/Source/API/ComputeStateObject.cpp
Framework/Source/API/Window.cpp
In file included from Framework/Source/API/Window.cpp:54:0:
/usr/include/GLFW/glfw3native.h:102:3: error: #error "No context API selected"
  #error "No context API selected"
   ^
Framework/Source/API/Window.cpp: In static member function ‘static Falcor::Window::SharedPtr Falcor::Window::create(const Falcor::Window::Desc&, Falcor::Window::ICallbacks*)’:
Framework/Source/API/Window.cpp:361:27: error: ‘GLFW_FALSE’ was not declared in this scope
         if (glfwInit() == GLFW_FALSE)
                           ^
Framework/Source/API/Window.cpp:370:41: error: ‘GLFW_NO_API’ was not declared in this scope
         glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
                                         ^
Framework/Source/API/Window.cpp: In member function ‘void Falcor::Window::msgLoop()’:
Framework/Source/API/Window.cpp:424:37: error: ‘glfwFocusWindow’ was not declared in this scope
         glfwFocusWindow(mpGLFWWindow);
                                     ^
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-misleading-indentation’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-nonnull-compare’ [-Werror]
cc1plus: all warnings being treated as errors
Makefile:170: recipe for target 'Framework/Source/API/Window.o' failed
make: *** [Framework/Source/API/Window.o] Error 1

Setting GraphicsState vao to nullptr crashes if vao was previously set

GraphicsState::setVao()
crashes with a read access violation if you try to set it to nullptr after it was previously set to some value.
On line 177 of GraphicsState.cpp, code attempts to GetVertexLayout() on pVao, which is nullptr.

This issue will not happen if set to nullptr initially b/c it wont pass the mpVao != pVao check on line 168. To repro, set gfx state vao to a vao, then set it to nullptr.

Crashes when loading scene

Problem: I ran the FeatureDemo app and it crashed when loading a scene file (I tested on 3/4 scenes from here: https://developer.nvidia.com/orca). Note that the app only crashes if it was built in release mode.

I debug the app in visual studio and fotunately MSVC catches an exception at line 95, file Framework\Source\Utils\Platform\Window\ProgressBarWin.cpp, which is:

SetWindowTextA(pData->hwnd, msgList[pData->dist(pData->rng)].c_str()); 

I commented this line out and the app works. Apparently there is a bug at this line.

Package '7za' at version '16.02' is missing from local storage

Hi,

Trying to setup the Falcor on Windows system. When I run "update_dependencies.bat" script I',m getting the following error: (Output of the script). is it looking for 7-Zip, have installed the 7-Zip 16.02 version.

Creating directory F:\packman-repo
Fetching [email protected] from s3 ...
Connecting to S3 ...
Downloading ...
Unpacking ...
Fetching [email protected] from s3 ...
Connecting to S3 ...
Downloading ...
Unpacking ...
Package '7za' at version '16.02' is missing from local storage.
packman(ERROR): Package not found on specified remote servers!
!!! Failure while configuring local machine :( !!!

Regards,
MJay

Again problem with update_dependencies

To lay the project on the second pc and again problems with update_dependencies.bat
I understand by mistake, he did not find glm and I need to separately shake and include it?

H:\GIT\FalcorTest\Falcor>update_dependencies.bat Processing project file 'H:\GIT\FalcorTest\Falcor\dependencies.xml' Package 'glm' at version '0.9.8.5' is missing from local storage. packman(ERROR): Package not found on specified remote servers!

Vulkan: Incorrect locations for vertex attributes

A Falcor user identified an issue when using Vulkan with a mesh that uses the vertex color channel (but not some of the attributes with earlier locations). The Falcor code defines:

#define VERTEX_DIFFUSE_COLOR_LOC 7

but when dumping locations from the generated SPIR-V the user sees:

Input Location=0 float4* SLANG_in_vIn_pos;
Input Location=1 float3* SLANG_in_vIn_normal;
Input Location=2 float3* SLANG_in_vIn_bitangent;
Input Location=3 float4* SLANG_in_vIn_color; 

In this case the Slang cross-compiler is working exactly as intended in translating the HLSL shader input declarations over to GLSL, but there is a mismatch between its behavior and what Falcor assumes about GLSL shaders.

In discussion with the Falcor team, we've concluded that the best option is probably for Falcor to query locations from Slang based on semantics (when they are available - that is, when translating from HLSL/Slang) and let those override the hard-coded locations.

Populating an array of Texture2D by including mipmaps.

First of all, thank you for the project. I find it incredibly useful for quickly trying out ideas and seeing the results almost instantly.

I've been trying to implement bindless texturing with Falcor by placing all the textures into an array of Texture2D but no matter what I tried I could not get the textures after the first one upload properly. I get no messages from the debugging layer during the upload operation but when I access the textures from the pixel shader, with the exception of the first texture in the array, they are all blank.

Is it actually feasible to achieve this with Falcor in its current state? If it is, do you have a working example of how to achieve this, or do you have any guidance you could share?

error by createGraphicsPipelineState

My Input layout looks like this:

	input_layout = Falcor::VertexLayout::create();

	Falcor::VertexBufferLayout::SharedPtr pVbLayout = Falcor::VertexBufferLayout::create();
	pVbLayout->addElement("POSITION", 0, ResourceFormat::RGB32Float, 1, 0);
	pVbLayout->addElement("TEXCOORD", 12, ResourceFormat::RGBA32Float, 1, 1);
	pVbLayout->addElement("TEXCOORD", 28, ResourceFormat::RGBA16Float, 1, 2);
	input_layout->addBufferLayout(0, pVbLayout);

when I call createGraphicsPipelineState, I got an error:
D3D12 ERROR: ID3D12Device::CreateInputLayout: Element[2] and Element[1] have the same Semantic (TEXCOORD 0). All Semantics in the Input Layout must be unique. This error is only printed on the first occurence detected. [ STATE_CREATION ERROR #62: CREATEINPUTLAYOUT_DUPLICATESEMANTIC]

Remove dependency on MFC..

Hi,
trying to compile Falcor 2.0 on Windows with VS2017 community.. I don't have MFC so I get errors like:
not found #include <atlstr.h>
in MonitorInfo.h
commenting it and adding #include <Windows.h> to monitorinfo.cpp seems clear it's using only for CString class which seems overkill..
so can remove tan dependency using std::string for example..
should help with posible portability to Linux also..
thanks..

Cannot run on Quadro GV100

Hi there.

So I've been trying to run HelloDXR without much luck. It compiles fine, but I run into the following issues described below:

Initially there is a complaint that VCOMP120.dll is not found. My drivers are up to date (I've tried both the ODE and QNF drivers supplied on the nVidia website.) I discovered that I had to actually install VC Redistributables 2013 to resolve the issue. Please note I'm using VS 2017 with the latest (and the recommended) Windows 10 SDKs installed and I am running Windows 10 RS4.

Once the above issue was resolved, every time I ran the binary I got the following error before the application automatically closed: "D3D12EnableExperimentalFeatures(...), Error! No such interface supported!" (please see attached screenshot.)

With much thanks in advance,
Baktash.

expfeatureissue

update texture with offset x and offset y

right now there is Buffer::updateData, but there is no such function in Texture class.
By the way in the Buffer::updateData there is only one offset. Can you please provide a function, which can update the texture from (offset x, offset y) with size (width, height)?

I can do this and upload the source if you don't have time.

Texture2DMS isn't recognized by the slang

I encounter an error:
my shader code is like this:
Texture2DMS<float4,2> s_texture_0 : register(t0);

in c++ code its kind is NULL
ReflectionType::SharedPtr reflectType(TypeLayoutReflection* pSlangType, const ReflectionPath* pPath)
{
auto kind = pSlangType->getType()->getKind();

FPS counter in demo incorrect / negative GPU times reported.

If I run the NormalMapFiltering demo from Falcor, it launches zoomed out, and claims 240fps.

If I zoom in on the face, the FPS completely breaks down.
I estimate to roughly 3 frames per second.

Yet, the FPS counter claims it runs at 30 fps, which is not correct.

See this video to observer the issue:
https://vimeo.com/260673177

Ubuntu 16.04.4 LTS
OpenGL renderer string: GeForce GTX 750 Ti/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 384.111

Vulkan validation layer errors when running most samples

With pretty much any sample I run under DebugVK, I get a bunch of spew to the debug log of the form:

FalcorVK Error: You must call vkBeginCommandBuffer() before this call to ...

There are other validation-layer messages, but these are the main annoyance. This makes it harder for me to notice when I introduce new errors into a sample, and also makes it less useful to place a breakpoint on the error logging to diagnose my own errors (I need to skip a bunch of these pre-existing errors before getting to mine).

Ideally the samples should all run without validation errors, since there might be some platforms where those validation issues result in instability.

vcomp120.dll not found

Hi there,

When I clone the repo, build debug d3d12 x64 and try to run any of the samples (eg "SimpleDeferred") I get an error message box which says it can't run due to vcomp120.dll not being able to be found.

Note that falcor worked for me a few months ago. It's only after getting latest that it doesn't.

I have also tried completely deleting both falcor and the packman repo folder, and starting fresh, but still get the same message.

Falcor upgrade process for clients

Hi,

Since the Falcor framework is in beta, I guess this is the best time to bring this up.
I was able to compile the framework into a static lib and bring into my toy engine and get it to display an empty scene (based on the 'ProjectTemplate' sample).

Based on this exercise, I believe the headers files for Falcor need be in their own include folder. Currently, they are mixed with the cpp files, and they are also located in third-party directories. In order to incorporate Falcor into my toy engine, I had to restructure some of the Framework directory, move some files about, delete non-header files, and edit one or two headers to repoint their #include directives.

My wish is to stay up-to-date with the latest version of Falcor whenever a new version is released to Github. Having to manually rearrange the code, like I did this first time, is error prone. It makes me nervous just thinking about it.

IMO, it would be ideal if upgrading to a newer version of Falcor were this easy:

  1. Update to Falcor HEAD: git pull origin master
  2. Build Falcor
  3. Copy the Falcor.lib (and others?) and an include directory to my toy engine.

If it were this easy, then this would allow me to automate the process down to calling a single script. That would be sweet.

Regards,
Vlad F

Loading Bistro scene on SceneEditor issues..

Hi,
testing Bistro scene on Falcor 2.0 beta SceneEditor I see:

*Direct3D12 seems a lot slower than Vulkan although you say D3D12 is lot more optimized:
Bistro interior scene: On a GTX970 I get 70fps on Vulkan and 25fps on D3D12 backend..
(using 382.88 Siggraph driver)

*Even compiling release mode SceneEditor needs lots of RAM for loading scenes:
I have a PC with 32GB RAM and SceneEditor fails silently to load (program exits) Bistro exterior scene when this process uses around 20GB of RAM.. haven't debugged yet to see where it fails but sounds like needs either more GPU VRAM (4gb VRAM) or CPU RAM..

*also seems SceneEditor on D3D12 can enter full screen with Alt+Enter but not on Vulkan (this is a minor issue but just commenting it..

INVALID_SUBRESOURCE_STATE

I first create a vertex buffer

	vertex_buffer = Falcor::FBuffer::create(vbSize, Falcor::FBuffer::BindFlags::Vertex, Falcor::FBuffer::CpuAccess::Read, (void*)vertex.get());

	vertex_buffer->setName("vertex_screen_buffer");
		Falcor::Vao::BufferVec buffers{ vertex_buffer };
		mpVao = Falcor::Vao::create(Falcor::Vao::Topology::TriangleList, input_layout, buffers, indices_buffer, Falcor::ResourceFormat::R32Uint);

then I draw

	pState->setVao(mpVao);
	getRenderContext()->drawIndexed(s.num_indices, s.indices_offset, s.vertex_offset + s.num_vertex * target);

for the first frame an error popped up

D3D12 ERROR: ID3D12CommandList::DrawInstanced: Resource state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) (assumed at first use) of resource (0x00000159998E4750:'vertex_screen_buffer') (subresource: 0) is invalid for use as a vertex buffer. Expected State Bits (all): 0x1: D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER, Assumed Actual State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Missing State: 0x1: D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]

after the first frame this error disappeared. As you can see that vertex_screen_buffer is indeed a vertex buffer, how can it be set to state D3D12_RESOURCE_STATE_COPY_DEST. I also debugged and found that the vertex_screen_buffer is in state D3D12_RESOURCE_STATE_COMMON.

no GraphicsProgram::createFromString in master branch

my program uses branch 3.0 and needs to preprocess the shader file. So I need to load shader file first , preprocess them and then pass the preprocessed shader to GraphicsProgram::createFromString. But now the function is removed in the master branch.

DXR fallback layer integration

Hi,

I am wondering if there is any plan to integrate DXR fallback layer into the engine?
Since I am doing some work based on Falcor, where I will possibly integrate fallback layer for myself anyway, I am wondering does team accept public contribution?

If you do, is there any contribution guide or coding standard? I can submit PR after I have done the work.

Thank you in advance :)

Integration of other GameWorks technologies.

In one of the presentations I've watched, you mention that you are planning to integrate VXGI and other GameWorks technologies into Falcor. Is there any development in this regard or is this a rather long term goal?

I personally would very much love to see VXGI and PhysX integrations happening.

Update Subresource like( D3D11_BOX))

I have a question. May I update part of texture like D3D11_BOX in Directx 11?
or can I create a reserved resource in Falcor?
I searched for this kind of function, but haven't found.
Thanks!

Shader with atomic intrinsics function failed to compile

Shader that use atomic intrinsics function failed to compile.
Here are a example of the code.

#define NUM_THREADS_ 256

groupshared uint gs_data[NUM_THREADS_];

[numthreads(NUM_THREADS_, 1, 1)]
void main(uint3 dispatchThreadID : SV_DispatchThreadID)
{
    uint origValue;
    InterlockedAdd(gs_data[dispatchThreadID.x], 1u, origValue);
}

Code processed by slangc


static groupshared uint  _SV07gs_data[256];

[numthreads(256, 1, 1)]
void main(vector<uint,3> _S1 : SV_DISPATCHTHREADID)
{
    uint _S2 = _S1.x;
    uint _S3;
    uint _S4 = (_SV07gs_data[_S2]);
    _S3 = _S4;
    uint _S5;
    InterlockedAdd(_S3, (1), _S5);
    uint _S6 = _S3;
    (_SV07gs_data[_S2]) = _S6;
    uint _S7 = _S5;
    return;
}

It's obvious that _S3 is not a groupshared variable or UAV.

Also there are some issue with slang I met before, do you guys think is it possible to provide some workaround solution instead of waiting the fix from slang?

AmbientOcclusion crash and incorrect render

When I start Ambient Occlusion, the model is rendered in pure white.
As I rotate the camera, black smudges appear in entire window.

image

When I click on [ ] Use Normal Map, I get a crash.

SEGMENTATION FAULT

#0  0x000000000049b779 in Falcor::ShaderResourceView::SharedPtr Falcor::findViewCommon<Falcor::ShaderResourceView, std::unordered_map<Falcor::ResourceViewInfo, std::shared_ptr<Falcor::ShaderResourceView>, Falcor::Resource::ViewInfoHashFunc, std::equal_to<Falcor::ResourceViewInfo>, std::allocator<std::pair<Falcor::ResourceViewInfo const, std::shared_ptr<Falcor::ShaderResourceView> > > > >(Falcor::Resource const*, unsigned int, unsigned int, unsigned int, unsigned int, std::unordered_map<Falcor::ResourceViewInfo, std::shared_ptr<Falcor::ShaderResourceView>, Falcor::Resource::ViewInfoHashFunc, std::equal_to<Falcor::ResourceViewInfo>, std::allocator<std::pair<Falcor::ResourceViewInfo const, std::shared_ptr<Falcor::ShaderResourceView> > > >&, std::function<Falcor::ShaderResourceView::SharedPtr (Falcor::Resource const*, unsigned int, unsigned int, unsigned int, unsigned int)>) ()
#1  0x0000000000498e6a in Falcor::Resource::getSRV(unsigned int, unsigned int, unsigned int, unsigned int) const ()
#2  0x00000000004ba75a in Falcor::SSAO::generateAOMap(Falcor::RenderContext*, Falcor::Camera const*, std::shared_ptr<Falcor::Texture> const&, std::shared_ptr<Falcor::Texture> const&) () at Framework/Source/API/Vulkan/VKSmartHandle.h:36
#3  0x000000000048006c in AmbientOcclusion::onFrameRender() ()
#4  0x0000000000485c35 in Falcor::Sample::renderFrame() ()
#5  0x000000000049bf9f in Falcor::Window::msgLoop() ()
#6  0x0000000000487209 in Falcor::Sample::run(Falcor::SampleConfig const&, unsigned int, char**) ()
#7  0x000000000047b671 in main ()

Ubuntu 16.04.4
OpenGL renderer string: GeForce GTX 750 Ti/PCIe/SSE2
OpenGL version string: 4.5.0 NVIDIA 384.111

Complains about missing external slang on windows

I downloaded Falcor, opened in vs 2017 (not 2015, is that ok?) and when i compile it complains about slang missing.

None of the projects build because they error on the missing file
2>d:\github\falcor\framework\source\Graphics/Program/ProgramReflection.h(32): fatal error C1083: Cannot open include file: 'Externals/Slang/slang.h': No such file or directory

Please let me know if there's any more information I can provide.

I'm going to try to work around it but figured i should report it as this is not listed in windows prerequisites or anywhere else that i can find.

[email protected]
https://twitter.com/Atrix256

1>------ Build started: Project: Falcor, Configuration: ReleaseD3D12 x64 ------
1>Processing project file 'D:\github\Falcor\dependencies.xml'
1>Package 'slang' at version '0.9.5' is missing from local storage.
1>Traceback (most recent call last):
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 967, in
1> main()
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 948, in main
1> return args.func(**vars(args))
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 419, in pull_cmd
1> variable_file)
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 453, in pull_with_variable_file
1> pull_dependencies(deps, remote_configs, remote_names, platform, postscript, variable_file)
1> File "D:\packman-repo\packman-common\5.1\packman.py", line 528, in pull_dependencies
1> package_path = tp[remote_name].get_package_path(package_name, package_version)
1> File "D:\packman-repo\packman-common\5.1\transport\httptransport.py", line 35, in get_package_path
1> if self.is_file_found(path):
1> File "D:\packman-repo\packman-common\5.1\transport\httptransport.py", line 25, in is_file_found
1> r = requests.head(protocol_and_path)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\api.py", line 95, in head
1> return request('head', url, **kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\api.py", line 50, in request
1> response = session.request(method=method, url=url, **kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\sessions.py", line 465, in request
1> resp = self.send(prep, **send_kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\sessions.py", line 573, in send
1> r = adapter.send(request, **kwargs)
1> File "D:\packman-repo\packman-common\5.1\site-packages\botocore-1.7.3\botocore\vendored\requests\adapters.py", line 431, in send
1> raise SSLError(e, request=request)
1>botocore.vendored.requests.exceptions.SSLError: [Errno 1] _ssl.c:507: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073: The command "call D:\github\Falcor\Framework\Source\..\BuildScripts\prebuild.bat D:\github\Falcor\Framework\Source\..\ D:\github\Falcor\ D:\github\Falcor\Framework\Source\ x64 x64 ReleaseD3D12 D:\github\Falcor\Bin\Int\x64\ReleaseD3D12\Lib
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073:
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073: :VCEnd" exited with code 1.
1>Done building project "Falcor.vcxproj" -- FAILED.

Scene Editor No Camera Crash

The scene editor crashes when creating a new scene or loading a scene without a camera. After loading a scene without a camera, the sample calls scene::update() which calls getActiveCamera()->beginFrame(). But there is no active camera, so it tries to call beginFrame() on nullptr and crashes inside that function with an access violation "This was nullptr"

UpdateDependencies - error when downloading Slang

When building I get the following error:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

This seems to occur when UpdateDependencies.bat tries to get Slang. I had to comment out the dependency and manually download the release to compile.

DDS BC2_UNORM file loading issue

I've tried to load DDS file with BC2_UNORM format and without mips. This scenario crashes the engine.

There is the message from DX12 debug layer:

D3D12 ERROR: ID3D12Device::CreateCommittedResource: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_1. D3D12_RESOURCE_DESC::Format is BC2_UNORM. [ STATE_CREATION ERROR #599: CREATERESOURCE_INVALIDMISCFLAGS]

What I've found is that the updateBindFlags function in Texture.cpp adds render target flag to this texture even though it is intended to be shader resource only.

SceneEditor crashes on scene load in Ubuntu 16.04

Trying to load Media/Arcade/Arcade.fscene in the scene editor, it throws an error:

Program Linkage failed.

Program with Shaders:
Framework/Shaders/SceneEditor.slang/*editorVs*//*editorPs*/

ERROR: /path/to/Bin/Data/DefaultVS.slang:78: 'uint' : must be qualified as flat in
ERROR: /path/to/Bin/Data/DefaultVS.slang:79: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

Maybe this is a bug in slang. ForwardRenderer opens the scene OK, which is strange since it also depends on DefaultVS.

DXR todo

  • Fix RtProgram interface
  • Work efficiently with dxil libs
  • Add UAV barriers before/after AS updates (also fix resourceBarrier() in ParameterBlock.cpp)
  • Remove SV_Attribs from shaders
  • Support shared
  • Support global root-signature
  • Optimize CSO override in raytrace()
  • Should we have a RaytraceContext?
  • Do we still need RtSample? yes, we do

Info about DirectX raytracing support..

I have read Falcor is working on DXR support and as you seem to be working on version 3 currently asking if it will be ready by that version release or a new branch will be created in the meanwhile to test.. thanks..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.