Jump to content

Landscape and getEventTextureDraw


photo

Recommended Posts

Posted

Hello everyone,

I had a question about terrains and events. Currently I have a terrain that I modify in C++  in callbacks connected to getEventTextureDraw. The work is huge, so I split the work in a myriad of smaller chunks, with every chunk being connected to the getEventTextureDraw, and unsubscribing at the end of the function. Each work is actually running a compute shader, then using a brush to apply some alterations to the terrain textures. I provoke those operations by calling asyncTextureDraw, using operation ID  and coordinates to make sure I'm executing the correct batch of work.

I assume all these callbacks bound by getEventTextureDrawn and provoked by asyncTextureDraw, are being executed sequentially in a thread different from the main thread ? I observed this, but I wanted to be sure.

Posted

Hi Kevin,

Yes, you are absolutely right.

getEventTextureDraw callback is called in the main thread, but the workload is being done in a separate threads (compute). All the changes are applied sequentially.

Thanks!

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 2 months later...
Posted

By curiosity, if we use the exact same code in Editor, instead of a runtime application, can we expect the same behavior ?

I noticed extremely slow behavior with the async callbacks, compared to what I had in runtime. It was mostly freezing too.

Posted

Hi Kevin,

Without reviewing the actual code used in both the runtime and the Editor, it's difficult to give a definitive answer. However, in general, the performance difference should be minimal, especially if both sides are running exactly the same code.

You may want to inspect the microprofile dumps (or profile the application in Visual Studio) to see what is happening under the hood and identify any potential discrepancies.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...