Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#144928   2018-07-16 07:52          
I came around and replaced the fixed function pipeline implementation of the reflecting surfaces to a programmable one, this is good because it opens up the game for advanced lighting models, though I could not manage to get per-object data to the d3d9.dll from the javascript engine; the rendering and the virtual machine is very well separated, this is bad however because eventhough we now can manipulate the appearance of parts to quite a great extent this feature can not be controlled from the script engine and that makes the whole thing again global (each reflecting surface will have the same properties (at least the same overwrites)).
Another bad thing about this is that because Slrr uses directx in an extremely uninformed manner (a frame in Valocity can easily exceed 60000 d3d calls...) FPS will suffer a bit (it's quite playable in my opinion, and the additional visual fidelity is well worth the 2-7 FPS deficit) and there isn't really anything to be done about it :/ (or at least not with my knowledge)
But now there is a reshadeFx\NativeHLSL\uPS_VS.hlsl file which can be used(and modified) to render the ingame reflecting surfaces (if someone is good with this kind of stuff, I do know that the hunt for the perfect car-paint shader is still interesting to some)

The good part is properly aligned relfections (from 2:30 in the video), a nicer specular reflection with "flakes", proper spot lights, per-pixel lighting, bump-mapping I must emphasise that it is bump-mapping not normal mapping (there is no available tangent or bitangent from the model format and the game is preforming slow enough as it is(without generating these at runtime) further more I'm pretty sure my bump map implementation is incorrect but I think there is another matrix needing inverting for it to be pristine but that is time consuming so I opted out)
mainly the ability to modify this aspect of the game is the plus side :)





I have updated the "Ever refreshing patchlink" for SlrrExhaustive and the SlrrExhaustiveBits download aswell.

(I must admit that my solution feels quite suboptimal but I honestly can't see a meaningful way to improve it this is not my expertise though and I'm fairly certain that if someone who actually knows shader programming takes a look at the .hlsl will faint let's hope after waking up he/she will optimize the code a bit and share the results :D )

As a last note this should be regarded as a not fully tested version there may be some obscure conditions I haven't ran into yet.

Added 5 minutes later:

Of course the current implementation is highly customisable as it has been before, there are numerous new properties in the ReflectionSettings.fx in the Reshade menu (for once the name checks out)

This post was edited by amilmand (2018-07-16 07:57, ago)