Rick Brewster

@rickbrewPDN

I'm Rick Brewster, author of Paint​.NET! I'll be tweeting about .NET, C#, C++, Paint​.NET, Windows things.

USA
Liittynyt maaliskuu 2019

Twiitit

Olet estänyt käyttäjän @rickbrewPDN

Haluatko varmasti nähdä nämä twiitit? Twiittien näyttäminen ei poista käyttäjän @rickbrewPDN estoa.

  1. 13. huhtik.

    Anyway all this wasn't a total loss. I ported all of PDN's shaders over to ComputeSharp, which is a big win, and I learned a lot about pixel shaders and D2D's effects system. Some great stuff is coming in 4.4! (psst ... plugins will finally be able to use D2D and GPU rendering!)

    Näytä tämä ketju
    Kumoa
  2. 13. huhtik.

    Why isn't any of this part of D2D docs?! Nobody knows. Unfortunately, Direct2D is "complete" and Microsoft, IIUC, doesn't have many resources assigned to it, not even for fixing its terrible documentation.

    Näytä tämä ketju
    Kumoa
  3. 13. huhtik.

    Some of the best documentation/discussion is over in Microsoft's Win2D GitHub repo, which is their WinRT wrapper for Direct2D. People post issues saying "wtf?" and the D2D devs have actually responded with in-depth technical answers.

    Näytä tämä ketju
    Kumoa
  4. 13. huhtik.

    And when it doesn't work at all you just get "intermediate texture too large" error codes. No debug output saying where or why or how or what. Nope. You have to guess, check, experiment. After a full week of this I'm throwing in the towel on a general-purpose SampleMap shader.

    Näytä tämä ketju
    Kumoa
  5. 13. huhtik.

    Direct2D's effect system also suffers from poor and inaccurate documentation, and insufficient descriptions of the algorithms that are employed behind the scenes. It's a FULLY opaque system... you can't even query the transform graph!

    Näytä tämä ketju
    Kumoa
  6. 13. huhtik.

    D2D limits intermediate textures in its effect rendering engine to 4K x 4K, which hurts, but raising that wouldn't matter -- max texture size on modern GPUs is 16K x 16K, so this limit would get hit anyway. One shader can't access more than that at once.

    Näytä tämä ketju
    Kumoa
  7. 13. huhtik.

    Or at least, you can't compute ahead-of-time which regions of the source input you'd need, unless you can run the shader first. You can do this if you're rendering "manually" with drawing calls, but you can't do it solely via the very "retained mode" effects system.

    Näytä tämä ketju
    Kumoa
  8. 13. huhtik.

    So, unfortunately, this particular experiment is a bust. I was really hoping to provide this for plugins to use! The key problem here is that for every output region (in fact, any output pixel), you potentially need access to the entire input image.

    Näytä tämä ketju
    Kumoa
  9. 13. huhtik.

    I've spent the last week trying every idea I can think of to tame the transform graph to try and minimize dependencies between nodes, or to cache vs not cache nodes at certain stages ... nope. No matter what I do, D2D just can't do it without gobbling up insane amounts of RAM.

    Näytä tämä ketju
    Kumoa
  10. 13. huhtik.

    (and that's only counting physical memory -- yeah, it'll commit gobs more, spilling out into the pagefile and filling your whole house with texture allocations)

    Näytä tämä ketju
    Kumoa
  11. 13. huhtik.

    Now for the bad news: Direct2D's effect system is REALLY REALLY REALLY bad when it comes to memory usage and I have not found a way to tame it. Running the SampleMap + PolarInversion shaders can consume all 24GB of my GeForce 3090's memory on an image that's only 16K x 16K pixels

    Näytä tämä ketju
    Kumoa
  12. 13. huhtik.

    ComputeSharp is really something special -- I'm writing HLSL pixel shaders in C#! No longer do I have to add an .hlsl file, hook up a pre-build event to call fxc.exe in special ways, then add an embedded resource with the compiled result (which is all fragile in its own ways)

    Näytä tämä ketju
    Kumoa
  13. 13. huhtik.

    Been working with Direct2D's effect system and pixel shader's authored in 's new ComputeSharp.D2D1Interop package ... I managed to port Polar Inversion over using a SampleMap shader, which takes an input image + shader producing (x,y) values to do this:

    Näytä tämä ketju
    Kumoa
  14. 17. maalisk.

    Although here's a non-spoiler, you're gonna see this a LOT ... even for myself as a Soulsborne veteran. Although not as much as I expected.

    Näytä tämä ketju
    Kumoa
  15. 17. maalisk.

    I'd love to share all these gorgeous screenshots I'm taking, but I really don't want to ruin the surprises for anyone who has yet to reach those points, or play at all. It's worth going in as blind as you can.

    Näytä tämä ketju
    Kumoa
  16. 17. maalisk.

    I hit F12 to take a screenshot and it (Steam) must've processed the screenshot command either during or immediately after the hang

    Näytä tämä ketju
    Kumoa
  17. 17. maalisk.

    Game is Elden Ring, btw. It might be hard to parse the screenshot, but I'm rolling to the left to avoid a strike, just in the nick of time. NPC name and health bar is pixelated to avoid potential spoilers for folks.

    Näytä tämä ketju
    Kumoa
  18. 17. maalisk.

    Well that's quite the place for the game to freeze ... for 60 seconds ... and then promptly unfreeze right as I'm about to kill the process in Task Manager. ... but I did not die, I won 😎 Really hope they fix the stutters though. Hasn't been too bad, but occasionally very wow

    Näytä tämä ketju
    Kumoa
  19. 9. maalisk.

    Paint​.NET v4.3.10 is now available, which is a hotfix for an error that happens when using Image->Resize w/ Nearest Neighbor resampling and certain image sizes.

    Kumoa
  20. 9. maalisk.

    Paint​.NET v4.3.9 is now available! Just a handful of fixes for this small update, esp. for a crash when running on the latest Win11 Insider "Dev" build (MSFT is fixing Windows, too)

    Kumoa

Lataaminen näyttää kestävän hetken.

Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.

    Saatat pitää myös

    ·