-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS3-like streaks? #1
Comments
Not impossible, especially considering this rendering technically already exists for motion blurring (previous frames), except that the flares and particles are omitted from its texture. Ideally this would be done specifically for the flares into its own texture(s) so we could replicate the effect, but I'm not sure how feasible this is. This would very likely require more code hacks to allow for it, but if anybody has an idea how this works, I'd be willing to give it a shot. We (technically) have some texture samplers free for this (MISCMAP textures) but I'm not very well versed in D3D coding to achieve the render to texture thing to work. |
the way I'd implement it (could not be how it's done though) is to render the flares into two color buffers using MRTs, with the first buffer just being the main backbuffer, and second being the streak buffer which gets 'cleared' with a 30%-ish maybe opacity quad (with the second output having 0.8 subtracted from it) EAGL already has MRT support (as evident by a number of shaders using an output struct for the pixel shader rather than directly outputting to COLOR0) |
Could you provide an example? I'm not exactly sure where to start with this (except by looking at already existing code in the game). |
Wrong issue, this is for NFSC_CustomVT. (btw - no need to wait for rain, toggle precipitation debugging with exopts or with my custom ReShade) |
not sure what you mean by example as in HLSL? |
yeah i just realised that lmfao |
Yes, HLSL would be good. It doesn't have to be game compatible or anything, just to see how it would be done. I'm not very familiar with shader coding or D3D coding so I'd like to know how it is implemented in code to see if it is even feasible. Right now I don't have a good idea of how to actually write a shader which will produce a trail effect at all (because I am basically a noob at this). |
well this shader would need an extra buffer to be set up and passed to the shader, with the blend set to one on both srcblend and dstblend (and an extra 50% ish alpha pass with the opacity modulated by deltatime so it's not framerate bound), but it'd go something like this:
|
and here's the DX9 doc for MRTs |
GPU needs D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING support it seems though (as technique pretty much relies on being able to do blending in MRTs) an alternate method that wouldn't need MRTs would be having a separate technique that'd run a wrapper like this directly into a separate buffer (but still with the 50-ish % opacity black quad clear to keep contents from previous frame but at a lower brightness)
|
seems like a threshold of 0.2 is good (might need to divide it afterwards though too) |
although another thing to note would be that the streaks seem to apply to all particles on PS3 (with sparks being bright enough to get above the threshold) |
thinking about it they could be also just done in a similar manner to NOS streaks, just remembering screen space position rather than world space, and well, using a separate technique for thresholding (which applies to sparks and other bright particles too it seems) |
The PS3 version (imo) has nicer looking streaks which, rather than using a texture, filter the flares and lerp the result with the previous frame's result in order to perform the streaks (like UG2 streaks but better looking)
might be a bit of a stretch, but could be worth a shot
The text was updated successfully, but these errors were encountered: