GithubHelp home page GithubHelp logo

pjbomb2 / truetrace-unity-pathtracer Goto Github PK

View Code? Open in Web Editor NEW
581.0 13.0 39.0 4.2 GB

A passion projects that has been going on for awhile, finally at a place where I feel comfortable tentatively uploading it to Github for others

License: MIT License

C# 85.99% ShaderLab 0.45% HLSL 13.56%
compute-shader computeshader hlsl cwbvh path-tracing bvh unity3d refit unity taa

truetrace-unity-pathtracer's People

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

truetrace-unity-pathtracer's Issues

Some emissive materials not shown correctly

I have some emissive materials that are not shown correctly.
It seems that the RayTracingObject BaseColor needs to be set manually
On my emissive materials the baseColor is black and only the emissive color is set:
image

Seems that the value then not gets applied correctly:
image

Provide Unity package

Hello there!

Looks like a very promising project.
Can you provide this as a Unity package with a package.json?
Would gladly test it out on my project.

Max supported UAV's in compute shaders exceeded?

Hey,

Getting this error+ a cascaded flow of random issues after it. Any clue what might cause this? Trying to run this on RTX 2080 laptop + Unity 2021.3.10f1.

There are more uavs (16) than the maximum supported (8) in ComputeShader 'RayTracingShader' kernel 'kernel_shade'.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
RayTracingMaster:Render (UnityEngine.RenderTexture) (at Assets/Resources/RayTracingMaster.cs:803)
RayTracingMaster:OnRenderImage (UnityEngine.RenderTexture,UnityEngine.RenderTexture) (at Assets/Resources/RayTracingMaster.cs:908)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

This then turns into a bunch of issues, such as

ArgumentException: SetData(): Accessing 1980 bytes at offset 0 for Buffer of size 1800 bytes is not possible.
UnityEngine.ComputeBuffer.SetData[T] (System.Collections.Generic.List`1[T] data) (at <88d854ea2c91426ebc464f01cd71aa85>:0)
RayTracingMaster.RebuildMeshObjectBuffers () (at Assets/Resources/RayTracingMaster.cs:307)
RayTracingMaster.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at Assets/Resources/RayTracingMaster.cs:905)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Is this somehow related to some GPU's not supporting 16 UAV's or something?

br,
Sami

Execute before PostProcess Stack

Hi Pjbomb2 testing the Pathtracer, I tried to stack it with PostProcess and it seems to be applied after the PostProcessing. Would it be possible to render it before PostProcess ?

There is an FSR 2.0 PostProcess which gives significant frame rate improvements by upscaling. I use it in most of my projects and it would probably be quite useful to make the Pathtracer even more performant.

URP and HDRP compability, mipmap

  • I tried working with unity version 2022.3.4f1 with URP. Path tracing just didn't start
  • I tried working with unity version 2023.2.8f1 with HDRP. At the start, I have a black screen and huge performance problem

There is no error in the console for both of them. Tried on DemoScene which came with package. Also all materials converted with unity's asset converter. I looked all the documenation but I couldn't found any solution.

And do you use mipmap? Don't using mipmaps, cause a weird view on textures. I attached a file for this.

2024-02-05 14-16-02, 0 Samples

Use zip not rar

I hop between machines a lot so I really notice the hassle of installing support for non-standard archive formats. 7zip - yeah. I get it. It can (sometimes) be worth it over zip files.

But rar? Really!?

Some meshes not visible

Hello,

I managed to get it to work on my fully dynamic project.
All my meshes/models get created in runtime and it somehow works.

Some of the meshes though were not shown at first.
After playing around with the settings a bit I enabled/disabled "Enable Object Moving" and now I also see these models.
Even if it's disabled now. Perhaps some cache that got created? unsure...

One request

Could you please upload a complete Unity project file? please

Update "Ray Tracing Object" on material change

Hello,

in my project I can freely change materials of all dynamic objects.
How can I update the "Ray Tracing Object" to re-evaluate or recreate the information there to the actual new material set?

Create MaterialMappings.xml relative to creating script

In my project I place every plugin/third party asset in assemblies and another subfolder. (i.e.: ...Assets\Plugins\TrueTrace)
Due to this the MaterialMappings.xml can't be found/created by your solution here.

Can you please create the file relative to the script that creates the file?

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.