Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

Legend

I genuinely hate Unity some times.

With Forged Odyssey I used a shader to render meshes as flat uv images. It's a great trick to convert objects back into textures. Well with Hapax I'm using Unity's new HDRP and while I love a lot about it, I'm at its mercy.

I tried replicating this but nope. HDRP doesn't support shader replacement and the function works as a regular render without any errors.

So I switch over and manually set it up. This is only for development so it can be slow and messy.


But then I run into another issue. Unity can't render negative values into textures. It's supposed to. Everything online says it does, but it seems HDRP is breaking that too.

So I just set the system to translate the floating point value to keep all of them positive. But this doesn't work because I then discover there is still something active messing with my colors after they are rendered.

I say screw it. I don't care to tear apart the unity hdrp right now. I'll just convert the float to 1s and 0s and send the data over 32 frames per color! By this point I have gone fully mad of course.

...

I ended up just using a command buffer. HDRP does whatever HDRP does and then I just render a second time after it finishes. Negative floats work fine.