Welcome, Guest.
Username: Password: Remember me

TOPIC: Will advanced techniques be supported?

Will advanced techniques be supported? 6 months 1 week ago #1

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 80
  • Thank you received: 51
Excuse me in advance for possible lack of technical knowledge, but when programming/scripting shaders in Unity you can do neat stuff like loops for passes, change texture sizes, get rid of textures altogether when not necessary anymore, would this be supported in any way in the future?

Let's say you want to do a simple multi-pass blur filter and don't want to be forced to write multiple passes, could one do a loop of passes instead?
Also the whole temporary textures concept would be great for things like brightpass/threshold, ping-pong etc.
Maybe a small scripting API could help achieve this?

A bit offtopic so I'll spoiler it:
Warning: Spoiler! [ Click to expand ]


By the way, great work on the in-game UI!
Last Edit: 6 months 1 week ago by luluco250.
The administrator has disabled public write access.
The following user(s) said Thank You: crosire

Will advanced techniques be supported? 6 months 1 week ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2451
  • Thank you received: 1390
Sure. Possible in theory. Just needs a nice syntax. That is, pass loops etc. The texture size is fixed for performance reasons.

As for HDR: This is not likely to happen. Not every game has a HDR intermediate step and there is no standardized way of doing it, so it would be very hard to detect. You can create HDR target textures with ReShade during post-processing, but the game input is always LDR (because the final output buffer is LDR, since drivers usually don't support anything higher).
Cheers, crosire =)
Last Edit: 6 months 1 week ago by crosire.
The administrator has disabled public write access.
The following user(s) said Thank You: luluco250

Will advanced techniques be supported? 6 months 1 week ago #3

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 80
  • Thank you received: 51
Alright, I guess I'll mess around with creating HDR using Bloom and other effects and tonemap it, but it can be a bit complicated due to not being able to read/write from the same texture unless it's the backbuffer, but that can be fixed with ping-ponging.

Thanks for the feedback!
The administrator has disabled public write access.

Will advanced techniques be supported? 5 months 2 weeks ago #4

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 80
  • Thank you received: 51
Hey, sorry for necroing this thread but I just wanted to show I managed to implement HDR on ReShade!

gfycat.com/MerryDecimalCarpenterant
The administrator has disabled public write access.

Will advanced techniques be supported? 5 months 2 weeks ago #5

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2451
  • Thank you received: 1390
Nice job. Although technically that's lighting adaption, not HDR. HDR isn't an effect, but a way to render scenes with more precise lighting information in a larger range, so details are preserved better and effects like adaption etc. have more information to work with.
Cheers, crosire =)
Last Edit: 5 months 2 weeks ago by crosire.
The administrator has disabled public write access.

Will advanced techniques be supported? 5 months 2 weeks ago #6

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 80
  • Thank you received: 51
I know what real HDR is (I have worked this bloom shader on Unity with real HDR), I made a shader that curves up the LDR backbuffer into an HDR texture using lerp and smoothstep, essentially thresholding.

It's not real HDR but it does what I need it to nicely.

Edit, here's how it works:

2 RGBA16F textures are created, one main and another for read/write.

Fake HDR shader writes to the main texture by thresholding the backbuffer, anything above that threshold is multiplied by a configurable value, using smoothstep this threshold is, obviously, smooth.

Any shader that requires read/write of HDR in the same pass can simply make use of a pre-created "CopyHDRtoTex" function and copy the current HDR to the second texture.

At the end of the pipeline before LDR shaders a tonemapping shader works on the main texture and writes to the backbuffer.

So it both is and isn't real HDR.
Last Edit: 5 months 2 weeks ago by luluco250.
The administrator has disabled public write access.
The following user(s) said Thank You: jas01

Will advanced techniques be supported? 5 months 2 weeks ago #7

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2451
  • Thank you received: 1390
I see =). Interesting approach!
Cheers, crosire =)
The administrator has disabled public write access.