Forum Discussion
ArthurBrussee
11 years agoHonored Guest
DX11 Compute buffers broken?
Hi There,
developer of TC Particles here, the one that makes the sparkes in MotM (http://rustltd.com/projects/the-museum-of-the-microstar)
Recently got my hands on a DK2, and it's awesome but I can't get TC Particles to work on it. After much digging I found the reason why stuff doesn't show up.
The particles are stored in a compute buffer (http://docs.unity3d.com/ScriptReference/ComputeBuffer.html). In editor this works fine. In a build however, it seems that only the very first element is set of the buffer, but the rest is just set to default values.
I tried Shader.SetGlobalBuffer and Material.SetBuffer variants. Both RWStructureBuffer and StructuredBuffers aren't working. This only is the case when I'm rendering with the OVR camera.
Any thoughts are much appreciated :) Hope this can be fixed in 0.4.2
Hardware:
Malibal Lotus - i7-3740QM 2.7ghz
16gb ram
Nvidia 680m 4gb
Using HDMI out to DirectMode only
developer of TC Particles here, the one that makes the sparkes in MotM (http://rustltd.com/projects/the-museum-of-the-microstar)
Recently got my hands on a DK2, and it's awesome but I can't get TC Particles to work on it. After much digging I found the reason why stuff doesn't show up.
The particles are stored in a compute buffer (http://docs.unity3d.com/ScriptReference/ComputeBuffer.html). In editor this works fine. In a build however, it seems that only the very first element is set of the buffer, but the rest is just set to default values.
I tried Shader.SetGlobalBuffer and Material.SetBuffer variants. Both RWStructureBuffer and StructuredBuffers aren't working. This only is the case when I'm rendering with the OVR camera.
Any thoughts are much appreciated :) Hope this can be fixed in 0.4.2
Hardware:
Malibal Lotus - i7-3740QM 2.7ghz
16gb ram
Nvidia 680m 4gb
Using HDMI out to DirectMode only
23 Replies
Replies have been turned off for this discussion
- granciaHonored GuestHi,
I've tested with Unity DX11 samples including ComputeBuffer, but I can't see any issue for now.
You'll be able to get Unity DX11 samples with following link. Please have a test with it.
https://dl.dropbox.com/u/1119248/DX11Examples-4.0.0b7.zip.
Thanks, - pommakExplorerOur DX11 compute particle system also got broken. First impression seems to be that buffers have erroneous data with 0.4.1b even though it's hard to confirm as debugging them is quite tedious. They worked just fine on 0.4.0.
- ArthurBrusseeHonored GuestGood to hear that I'm not the only one with the problem :)
I tried the unity examples, and got the same result. I tried the DrawProcedural scene. In editor it works fine. Then when I add an OVR camera and build it, it only shows two stripes. This seems to be the same behaviour as I described: only the first element of the buffer is set to the right data, the rest is just set to 0.
Maybe this is a hardware specific problem? This was tested on a nvidia optimus laptop (680m), I've heard about issues with optimus. - pommakExplorer
"ArthurBrussee" wrote:
Maybe this is a hardware specific problem? This was tested on a nvidia optimus laptop (680m), I've heard about issues with optimus.
My laptop has 780M and no Optimus afaik. Probably can test on couple different h/w configurations soon, I'll post more info when I've been able to do that. - AntonHonored GuestTested this on two other hardware configurations. This is confirmed to be broken on desktop gpus as well. Exact same behavior.
@Grancia: Any ideas on what could be happening here? Something about the build process does seem to be breaking compute buffers in a replicable way. Would it be helpful for you if we put together a repro-project? If so, what's the best way to get it to you (as it contains a commercial asset we'd rather not post publicly). - Anonymousyeah, no DX11 TCparticles here either... help Oculus! :)
- Gypsy816Expert ProtegeHello! What project is this occurring on/with?
- ArthurBrusseeHonored GuestHere's a little test project demostrating the issue:
http://g2f.nl/0bkbtvp
TC Particles is commercial so I can't post it here, but I have PM'ed you a package with TC Particles in it,to show the issue there as well.
Also, here is a screenshot of it running in editor:
http://g2f.nl/0ck12to
It is just broken in builds.
(Note that in editor display for me only works very sporadically, basically just the first time I start unity, any resizing or restarting play mode breaks it)
This is all on unity 4.5.3. Thanks for taking a look :) - vrdavebOculus StaffThanks for the sample, Arthur. Note that 4.5.3 was released after our 0.4.1 integration, so it is not guaranteed to work. For now, I would recommend switching back to 4.5.2. That being said, I just built and ran your code with Unity 4.5.3. It started out rendering to the wrong monitor with a plain black screen. I re-ran and held the ALT key on startup to select the rift instead and it worked for me.
- vrdavebOculus Staff
"ArthurBrussee" wrote:
Then when I add an OVR camera and build it, it only shows two stripes.
If your game view is not maximized on the rift, the "stripes" are probably misshapen distortion meshes. Those are meant to compensate for lens distortion on the Rift. We will improve the editor experience in a future release. For now, can you switch to extended mode, drag the Game tab over to the Rift, and maximize it?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 1 month ago
- 3 months ago
- 4 months ago
- 1 year ago