DxR | Unity package for rapid prototyping | Augmented Reality library
kandi X-RAY | DxR Summary
kandi X-RAY | DxR Summary
DXR is a Unity package that makes it easy to create immersive data visualizations in XR (Augmented/Mixed/Virtual Reality). A visualization in DXR is a collection of Unity game objects whose visual properties (position, color, size, etc.) can be mapped to data attributes. The designer can specify this mapping interactively at runtime via a graphical user interface (GUI) or via a high-level programming interface, inspired by Polestar and Vega-Lite, respectively. DXR is extensible, allowing the use of most Unity game objects for custom marks and channels. To learn more, check out the example and gallery previews below, as well as the DXR website:. As a simple example, below, given a concise JSON specification (left) from the user, DXR generates an interactive visualization (right) in Unity.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DxR
DxR Key Features
DxR Examples and Code Snippets
Community Discussions
Trending Discussions on DxR
QUESTION
After watching videos and reading the documentation on DXR and DX12, I'm still not sure how to manage resources for DX12 raytracing (DXR).
There is quite a difference between rasterizing and raytracing in terms of resource management, the main difference being that rasterizing has a lot of temporal resources that can be bound on the fly, and raytracing being in need of all resources being ready to go at the time of casting rays. The reason is obvious, a ray can hit anything in the whole scene, so we need to have every shader, every texture, every heap ready and filled with data before we cast a single ray.
So far so good.
My first test was adding all resources to a single heap - based on some DXR tutorials. The problem with this approach arises with objects having the same shaders but different textures. I defined 1 shader root signature for my single hit group, which I had to prepare before raytracing. But when creating a root signature, we have to exactly tell which position in the heap corresponds to the SRV where the texture is located. Since there are many textures with different positions in the heap, I would need to create 1 root signature per object with different textures. This of course is not preferred, since based on documentation and common sense, we should keep the root signature amount as small as possible. Therefore, I discarded this test.
My second approach was creating a descriptor heap per object, which contained all local descriptors for this particular object (Textures, Constants etc..). The global resources = TLAS (Top Level Acceleration Structure), and the output and camera constant buffer were kept global in a separate heap. In this approach, I think I misunderstood the documentation by thinking I can add multiple heaps to a root signature. As I'm writing this post, I could not find a way of adding 2 separate heaps to a single root signature. If this is possible, I would love to know how, so any help is appreciated.
Here the code I'm usign for my root signature (using dx12 helpers):
...ANSWER
Answered 2021-Jan-20 at 10:23Dynamic indexing of HLSL 5.1 might be the solution to this issue.
https://docs.microsoft.com/en-us/windows/win32/direct3d12/dynamic-indexing-using-hlsl-5-1
- With dynamic indexing, we can create one heap containing all materials and use an index per object that will be used in the shader to take the correct material at run time
- Therefore, we do not need multiple heaps of the same type, since it's not possible anyway. Only 1 heap per heap type is allowed at the same time
QUESTION
Using FlyingSaucer within a JavaFX application, to avoid WebView for various reasons:
- doesn't provide direct API access to its scrollbars for synchronous behaviour;
- bundles JavaScript, which is a huge bloat for my use case; and
- failed to run on Windows.
FlyingSaucer uses Swing, which requires wrapping its XHTMLPanel
(a subclass of JPanel
) in a SwingNode
to use alongside JavaFX. Everything works great, the application renders Markdown in real-time, and is responsive. Here's a demo video of the application running on Linux.
The text rendering on Windows is blurry. When running in a JFrame
, not wrapped by a SwingNode
, but still part of the same application shown in the video, the quality of the text is flawless. The screen capture shows the application's main window (bottom), which includes the SwingNode
along with the aforementioned JFrame
(top). You may have to zoom into the straight edge of the "l" or "k" to see why one is sharp and the other blurry:
This only happens on Windows. When viewing the font on Windows through the system's font preview program, the fonts are antialiased using LCD colours. The application uses grayscale. I suspect that if there is a way to force the rendering to use colour for antialiasing instead of grayscale, the problem may disappear. Then again, when running within its own JFrame
, there is no problem and LCD colours are not used.
Here's the code for the JFrame
that has a perfect render:
ANSWER
Answered 2020-Aug-19 at 12:17There are a few options that you might try although I have to admit that I do not know FlyingSaucer and its API.
FlyingSaucer has different renderers. Thus it might be possible to avoid the Swing/AWT rendering completely by using this library instead in order to do all the rendering directly in JavaFX. https://github.com/jfree/fxgraphics2d
Another possibility is to let FlyingSaucer render into an image which can the be displayed in JavaFX very efficiently via direct buffers. See the AWTImage code in my repository here: https://github.com/mipastgt/JFXToolsAndDemos
QUESTION
How can I add a child class from an outside parent using JavaScript?
For example, in CSS it would look like this for the class:
...ANSWER
Answered 2020-Jun-09 at 20:11You were almost there. The minimal change is change from:
QUESTION
I have a data set and I tried to find approxQuantile. It works for sample set but not with window function.
...ANSWER
Answered 2020-Apr-04 at 12:58I am not sure how to do that idiomatically in Spark but if running multiple computations is not an issue you can
- Collect all categories
- Run computation for each category
- Union results
QUESTION
DirectX 12 Ultimate/Feature Level 12_2 is mainly about DXR Tier 1.1, Mesh Shader, Sampler Feedback and Variable Rate Shading. But how is the situation with other features like Map Default Buffer, Shader Specified Stencil Reference Value or higher required Tiers for Conservative Rasterization and Tiled Resources? Will the requirements remain the same there or will something change there?
...ANSWER
Answered 2020-Mar-23 at 19:00My understanding is that the formal definition of D3D_FEATURE_LEVEL_12_2
is still being worked on beyond those features listed here.
You can assume that everything defined for D3D_FEATURE_LEVEL_12_1
will be supported since by design feature levels are additive as noted here.
Because the 'top-line' features of DirectX Raytracing, Mesh Shader, Sampler Feedback, and Variable Rate Shading all make use of DXC/DXIL/Shader Model 6, you can also assume the new feature level is going to require Shader Model 6+ support which is currently optional.
Stay tuned...
QUESTION
I'd have a little question on prism / xaml in general. If someone has a clue, I'd be happy to know about it.
I made up a standard Prism application with a Prism module (Prism 6.3.0). There I have a main view consisting of the following code:
...ANSWER
Answered 2019-Nov-21 at 17:14As a general rule, try to go view model first, if you can, as it makes things easier and clearer.
So in your case, instead of
QUESTION
I have multiple geometries (D3D12_RAYTRACING_GEOMETRY_DESC) inside of a single DXR bottom level acceleration structure (BLAS). How can I determine which of those was hit inside of a closest hit shader? The following HLSL intrinsics do something different:
- PrimitiveIndex() returns the triangle index for the current geometry, but it restarts for each new geometry inside of the BLAS, so I don't know which one was hit.
- InstanceIndex() returns the index of the top level but not of the bottom level
- InstanceID() again, is only defined for the top level
ANSWER
Answered 2019-Oct-12 at 17:40I am wondering about that as well. Unfortunately, I can't give you a definitive answer but on this page I found the following statement:
Since hit groups need information about the geometry that was hit – its vertex data and material properties – you typically need a local root table for them. To avoid passing data through the local root table, you may also use the instance id field in the top-level instance descriptor and utilize the instance index, which are implicitly available in the hit group shaders. Remember, though, that these values are shared between all geometries in the instance when the bottom level structure contains more than one geometry. To have unique data for each geometry, a local root table must be used.
So if I understood that correctly, you either have to use a local root table or you have to restrict yourself to only one geometry per bottom level structure.
There is a MultiplierForGeometryContributionToShaderIndex parameter in TraceRay which you can set to 1 to get a different hit group per geometry. If you store a list of materials per hit group, you probably need only one hit group per geometry.
See also RaytracingMiniEngineSample.
QUESTION
I need to get the response of the pacScript in my chrome extension.A pacScript will return DIRECT
string in case we don't need to proxy and i want to detect that.
ANSWER
Answered 2019-Oct-06 at 06:47What you're trying to do is simply not possible. This is because a pac file is evaluated for each url you request. So, the 'pac response string' is not a constant that can be returned upon setting the proxy settings.
If you're trying to debug your pac file, you can alert('settings')
inside the FindProxyForURL
just before returning the settings. The alert creates a log entry which can be accessed via chrome://net-internals/#events
functionality.
If you only want to test if the user is using direct connection or proxy, you can compare the external ip address before and after setting proxy settings. Checkout ipify.org or you can even use a script on your own web server.
Here's some sample code for this:
QUESTION
For sorting numbers in javascript we trick function sort() given in Javascript and it works perfectly. The trick is given below:
[12, 2, 23, 3, 43, 54].sort(function (a, b) { return a - b ; } )
Source #1 and Source#2
I didn't understand what exactly this a - b
does. I have checked source code but its hard to understand. I checked following answer from stackoverflow but my doubt haven't cleared yet.
Algorithm of JavaScript “sort()” Function
Can anyone explain me what exactly happens at a - b
?
ANSWER
Answered 2019-Sep-13 at 09:14From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort:
If
a
andb
are two elements being compared, then:
- If
compareFunction(a, b)
is less than 0, sorta
to an index lower thanb
(i.e.a
comes first).- If
compareFunction(a, b)
returns 0, leavea
andb
unchanged with respect to each other, but sorted with respect to all different elements.- If
compareFunction(a, b)
is greater than 0, sortb
to an index lower thana
(i.e.b
comes first).
When having a array of numbers, (a, b) => a - b
(a simple subtraction) will thus behave as follow:
- If
a
is greater thanb
, then a positive number will be returned (e.g. 5 - 3 = 2): according to the 3rd rule above,b
comes first. - If
a
equalsb
, then 0 will be returned (e.g. 5 - 5 = 0): according to the 2nd rule above, leavea
andb
unchanged. - If
a
is smaller thanb
, then a negative number will be returned (e.g. 3 - 5 = -2): according to the 1st rule above,a
comes first.
QUESTION
Is there any official directive in .clang-format
file to exclude directory for applying?
Projects sometimes use git submodule
, but it is not useful to run clang-format
over all directory and then use git checkout
to undo changes in submodule folder.
I have found some related links:
But they don't seem official.
...ANSWER
Answered 2018-Aug-10 at 20:25So far, I don't know of any option of clang-format to exclude files or directories. But what I do, is to create the list of files I want to process in a bash script and then call clang-format for them:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DxR
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page