thmfrnk

Members
  • Content count

    34
  • Joined

  • Last visited

Community Reputation

167 Neutral

About thmfrnk

  • Rank
    Member
  1. DX11 Temporal Antialising

    Yes I found it here: advances.realtimerendering.com/s2016/ >Temporal Antialising in Uncharted 4 Very cool! The only thing I couln't find was how big these offests should be in the Projection Matrix, in the Slides they've shown to replace Proj[2,0] and [2,1] with offsets. EDIT: Just found the answer here: https://bartwronski.com/2014/03/15/temporal-supersampling-and-antialiasing/ @J thanks again for your help. I'll make test next days and see how it works.
  2. DX11 Temporal Antialising

    If its really only the projection matrix, it would be awesome! Looking forward to your reply
  3. Hello, I am working on a Deferred Shading Engine, which actually uses MSAA for Antialising. Apart from the big G-Buffer ressources its working fine. But the intention of my engine is not only realtime-rendering as also render Screenshots as well as Videos. In that case I've enough time to do everything to get the best results. While using 8x MSAA, some scenes might still flicker.. especially on vegetations. Unfortunately 8x seems to be the maximum on DX11 Hardware, so there is no way to get better results, even if don't prefer realtime. So finally I am looking for a solution, which might offer an unlimited Sample count. The first thing I thought about was to find a way to manually manipulate MSAA Sample locations, in order to be able to render multiple frames with different patterns and combining them. I found out that NVIDIA did something equal with TXAA. However, I only found a solution to use NVAPI, in order to change sample locations. https://mynameismjp.wordpress.com/2015/09/13/programmable-sample-points/ While I am working on .NET and SlimDX I've no idea how hard it would to implement the NVIDIA API and if its possible to use it together with SlimDX. And this approach would be also limited to NV. Does anyone have an idea or maybe a better approach I could use? Thanks, Thomas
  4. HTC Vive

    Hi,   I'm wondering how to use one of the current available VR tools like HTC Vive in own applications. Unfortunately the websites and explanations are not really clear for me. I always found stuff for Unity, Unreal and Steam but is there no simple SDK for to use in own applications? I've done several business realtime 3D applications where I would like to integrate a VR Support. Is there someone could help or already haves expirience with thoose tools?   Thx, Thomas
  5. // Get Picking Ray from Camera Public Function GetPickingRay(sp As Vector2) As Ray Dim v1 As Vector3 Dim v2 As Vector3 Dim vp as Matrix = GetViewProjMatrixFromCamera() Dim Point As Vector3 = New Vector3(sp.X, sp.Y, 0) v1 = Vector3.Unproject(Point, Viewport.X, Viewport.Y, Viewport.Width, Viewport.Height, Viewport.MinZ, Viewport.MaxZ, vp) Point.Z = 1 v2 = Vector3.Unproject(Point, Viewport.X, Viewport.Y, Viewport.Width, Viewport.Height, Viewport.MinZ, Viewport.MaxZ, vp) Dim Loc As Vector3 = v1 Dim Dir As Vector3 = Vector3.Normalize(v2 - v1) Return New Ray(Loc, Dir) End Function ... // Get Ray at Mouse Position Private Function GetTransformedRay(MousePos As Vector2, worldMat As Matrix, Editor As TEditor) As Ray Dim cRay As Ray = Editor.MyView.Camera.GetPickingRay(MousePos) Dim InvMat As Matrix = Matrix.Invert(worldMat) Return New Ray(Vector3.TransformCoordinate(cRay.Position, InvMat), Vector3.TransformNormal(cRay.Direction, InvMat)) End Function Here some Code, how I am doing ray picking an object. Using the GetTransformRay function you will get the Ray in ObjectSpace for the Object you want to test.
  6. Hey,   I am looking for a way to store my Texture-Pool in a more efficient way. Actually I simply use the Texture2D.ToFile option from SlimDX and save it as a DDS. Unfortunatly it does not give an option to save it as a compressed DDS file, so it ends up in very big files. So what would be the fasted way to store it as compressed DDS files? I am using DX11..   THX, Thomas
  7. DX12 .Net DX12

    The biggest Pro for SlimDX by my opinion is, that it works fine with VB.NET. SharpDX does not support VB.NET because they messsed up some case sensitive exports. Another big point are projects which are already done in SlimDX. So @promit, pleeeeaasse continue your great work! :rolleyes:
  8. Hey,   I was wondering if someone ever tested if there is a performance difference between using an UAV to write in a second texture while rendering in another target or simply using an MRT. In some cases it could be easy using an UAV, especually if you want to write in specual conditions without struggeling with blending.   Cheers,  Thomas
  9. DX11 DirectCompute and Multi-GPU

    mhh this is really frustrating, because I am bound to slimdx and there is no dx12. But the strange thing is, that its already possible for PhysX to move this to the second card and I don't think that PhysX is moving all the data back to CPU.
  10. Hi,   I am working actually on my compute shader based fluid simulation and I thought to power it up by testing two GTX980 in SLI. Finally I noticed that there is no benefit because he's using only one GPU. However I think it could be possible by using two DX11 devices bound to booth adapters. In that case the first could run the rest of my application (deferred lighting stuff and others) and the second one haves enough power for my phyisics. So my questions are: Is that possible? I think I would need some kind of device independend buffers to share the result of the physics.   Does everyone have some expirience here?   Thx, Thomas
  11. Fluid - Spatial Grid

    Hi _void_   thank you for your answer. I got it working like you suggested and its workling like a charm. BUT the problem I have now is the Grid-Size. I need to cover an 3D area of about 200x200x20m (and bigger) and to be fast enough I need a cell size of 10cm. In that case my lookup table (where I store the first and last Index of my sorted IndexList), would be about 6GB. Of course only 2% of cells would be filled so a lot of wasted storeage. I know DX12 comes with VolumeTiledRessouces, but I need to stay on DX11. Any idea?   thx, Thomas
  12. Fluid - Spatial Grid

    Sorry I am not that math pro, but I need to get it work for vector 3 positions and 32bit indices. I would appreciate any code examples ;)
  13. Hello,   I try to implement an SPH Fluid Simulation based on DirectX 11 Sample from the SDK. I got the N² working, but the Grid/Sort is hard to understand for me. In the example (done by Matthias Müller an Scott Le Grand) from DirectX, the Grid is limited to a 16bit hash so "only" 64K particles. But I need at min 32-Bit and way bigger grid.   Here some code of the sample, where he's constructing the Grid. I've no idea what he's doing here and how to extend it to 32bit..   EDIT: And I also need to extend this to 3D positions, as my fluid is not 2D like in the Demo. //-------------------------------------------------------------------------------------- // Grid Construction //-------------------------------------------------------------------------------------- // For simplicity, this sample uses a 16-bit hash based on the grid cell and // a 16-bit particle ID to keep track of the particles while sorting // This imposes a limitation of 64K particles and 256x256 grid work // You could extended the implementation to support large scenarios by using a uint2 float2 GridCalculateCell(float2 position) { return clamp(position * g_vGridDim.xy + g_vGridDim.zw, float2(0, 0), float2(255, 255)); } unsigned int GridConstuctKey(uint2 xy) { // Bit pack [-----UNUSED-----][----Y---][----X---] // 16-bit 8-bit 8-bit return dot(xy.yx, uint2(256, 1)); } unsigned int GridConstuctKeyValuePair(uint2 xy, uint value) { // Bit pack [----Y---][----X---][-----VALUE------] // 8-bit 8-bit 16-bit return dot(uint3(xy.yx, value), uint3(256*256*256, 256*256, 1)); } unsigned int GridGetKey(unsigned int keyvaluepair) { return (keyvaluepair >> 16); } unsigned int GridGetValue(unsigned int keyvaluepair) { return (keyvaluepair & 0xFFFF); } //-------------------------------------------------------------------------------------- // Build Grid //-------------------------------------------------------------------------------------- [numthreads(SIMULATION_BLOCK_SIZE, 1, 1)] void BuildGridCS( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { const unsigned int P_ID = DTid.x; // Particle ID to operate on float2 position = ParticlesRO[P_ID].position; float2 grid_xy = GridCalculateCell( position ); GridRW[P_ID] = GridConstuctKeyValuePair((uint2)grid_xy, P_ID); } //-------------------------------------------------------------------------------------- // Build Grid Indices //-------------------------------------------------------------------------------------- [numthreads(SIMULATION_BLOCK_SIZE, 1, 1)] void ClearGridIndicesCS( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { GridIndicesRW[DTid.x] = uint2(0, 0); } [numthreads(SIMULATION_BLOCK_SIZE, 1, 1)] void BuildGridIndicesCS( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { const unsigned int G_ID = DTid.x; // Grid ID to operate on unsigned int G_ID_PREV = (G_ID == 0)? g_iNumParticles : G_ID; G_ID_PREV--; unsigned int G_ID_NEXT = G_ID + 1; if (G_ID_NEXT == g_iNumParticles) { G_ID_NEXT = 0; } unsigned int cell = GridGetKey( GridRO[G_ID] ); unsigned int cell_prev = GridGetKey( GridRO[G_ID_PREV] ); unsigned int cell_next = GridGetKey( GridRO[G_ID_NEXT] ); if (cell != cell_prev) { // I'm the start of a cell GridIndicesRW[cell].x = G_ID; } if (cell != cell_next) { // I'm the end of a cell GridIndicesRW[cell].y = G_ID + 1; } } Is there someone could help me here?   Thanks in advance, Thomas
  14. Hi,   I'm looking for a way to give my users the option to use automatically generated UV coords instead of UVs delivered by imported meshes. So something equal like in Cinema 4D where you can choose between UVW, Cubic, Cylindric, Spherical, etc.. mapping. Finally I want to generate the UVs based on vertex positions and normals. I think this should be possible in Vertex or Geometry shader, but I've no idea actually. I know the result would not be always perfect for non-convex meshes, but most cases are for simple boxes, spheres or planes.   Any help, links or codes are appreciated.   Thanks, Thomas
  15. CS write to Texture

    Oh fu** ... sorry guys. I was calling the dispatch(8, 8, 0) instead of (8, 8, 1) DirectX gives me millions of warnings for each pice of shit, why not in this case.. this took me the whole day..