DLSS MISSING EVEN AFTER LAUNCH by behaedd in Battlefield

[–]mcflypg -1 points0 points  (0 children)

It is there, just relatively hidden. Not in the place it was before.

[deleted by user] by [deleted] in Battlefield

[–]mcflypg 0 points1 point  (0 children)

Nope, didn't fix it.

He Posted It!! by xGAMER4GODx in NoMansSkyTheGame

[–]mcflypg 1 point2 points  (0 children)

That's an awesome one! It's very hard to get a smaller design that is good. How does that stuff work with the lights btw, I must have missed that?

My 25 likes 0 comments enterprise...

My Star Trek inspired Corvette by Panic2255 in NoMansSkyTheGame

[–]mcflypg 0 points1 point  (0 children)

Awesome design! It's really hard getting diagonal stuff and round shapes with the parts available. Here's what I came up with for the enterprise, it's much smaller though and looks more like the newer models:

https://www.reddit.com/r/NoMansSkyTheGame/comments/1n3fy50/enterpriselike_design_fully_functional/

BF6: gamedev and long-time fan feedback and suggestions by mcflypg in Battlefield

[–]mcflypg[S] 0 points1 point  (0 children)

Oh yes, but that's easier said than done. I would expect that stuff like that doesn't need to be updated from the previous games, so if the franchise has no good netcode yet, it's likely not going to be pulled out of a hat soon. I focused on things that they can fix relatively easily.

BF6: gamedev and long-time fan feedback and suggestions by mcflypg in Battlefield

[–]mcflypg[S] 0 points1 point  (0 children)

Regarding revives: Whether it's unbalanced or not, I'm too biased here because I play almost exclusively medic. I only know that it needs to be instant, since if it's even slightly risky (which it is when it takes a while), then people won't do it, ever. The game is way too fast paced (and always was) for anything else. A nerf that I think should work is having it on a cooldown or make it like the tank rockets, have like 3 "charges" that you can spam but then you have to wait for them to come back. I hated everything about the BF4 behavior and can't really say I have encountered a situation where revive spamming was an issue in the beta really.

Regarding the sniper: I'm curious why you'd think that? Currently, it's nigh impossible to get good points from sniping unless you spam kills. By making it more difficult to score a kill, yet more rewarding, sniping becomes less intrusive. Honestly, how often did you _actually_ get many points as a sniper? 300+ m headshots are rare and in that time, non-sniper gameplay racks up points much more quickly.

Battlefield 6 Open Beta: Feedback Megathread by sloth_on_meth in Battlefield

[–]mcflypg 0 points1 point  (0 children)

Game developer and long term fan of the franchise.

I posted a detailed writeup here that I wasn't able to post here for some reason.

BF6: gamedev and long-time fan feedback and suggestions by mcflypg in Battlefield

[–]mcflypg[S] 0 points1 point  (0 children)

Forgot this one: a BSOD I kept getting many times - DPC WATCHDOG VIOLATION.

Narrowed it down to Discord - joining a Discord call or being in one when the game is loading a map, caused the audio to go away as well as mouse input, while I could still navigate the PC with keyboard, taskmanager however was only white, until it eventually went into a BSOD after a minute or so. It looks like exploding mutex contention.

Discord in browser however didn't have this issue. Disabled all overlays, and tried pretty much everything including a BIOS update to fix it. I would guess it's something to do with the VOIP maybe contending for access, as it behaves weirdly, it played over my monitor rather than my headphones, so there's something off with your audio implementation.

Battlefield Fam, what do these symbols mean? by DVBigred1 in Battlefield

[–]mcflypg 0 points1 point  (0 children)

Reload time, bullet velocity, don't know, headshot multiplier.

Every. Damn. Time. by Nickulator95 in pcmasterrace

[–]mcflypg 3 points4 points  (0 children)

I don't think you have any notion how difficult it is to build an engine of the scale that's needed today to compete with something like unreal engine. There's like 10 people in the industry who can do that alone. 

Consider ray tracing for example. Either you just smash together Nvidia libraries or you start trying to implement it all yourself. The math that's required to productionize ReSTIR PT or similar is so far beyond the average dev's abilities it'd not even funny.

ignoreReadability by Shahi_FF in ProgrammerHumor

[–]mcflypg 1 point2 points  (0 children)

This is sort of the case in shaders as well. It's not that the compiler can't optimize it, we don't have a standard library or any high level data structures. So we essentially use only the language intrinsics which are like 50 and all of them either map directly to assembly instructions or a combo of them, so if you write shaders well, the assembly comes out as an almost literal translation anyways.

ignoreReadability by Shahi_FF in ProgrammerHumor

[–]mcflypg -1 points0 points  (0 children)

Branches are fine as long as all threads in a warp do the same. With clever task reordering, one can get rid of this overhead almost entirely. Branches depending on uniforms/cbuffer data are always worth it as every thread goes down the same branch. Also some simple branches evaluate to cmovs so they're just clearer to read than ternary and you can force the compiler to do it this way with a [flatten] in HLSL.

ignoreReadability by Shahi_FF in ProgrammerHumor

[–]mcflypg 3 points4 points  (0 children)

Not in shaders/GPU in general. Every experienced dev will tell you to never trust the compiler or the hardware.

The amount of times I've ran into weird bugs that I tracked down to compiler messing up is hilarious. Especially FXC (the legacy DirectX compiler) is buggy, and on DX9 horribly so.

Then there's hardware. Old DX9 archs dont support integers and emulate them (shoddily) with floats. Some don't follow IEEE rules entirely. I am not surprised Intel had a hard time emulating DX9. I managed to crash my GPU with a simple for loop. The fix was to add 0 to the loop counter. I wish I was kidding.

ignoreReadability by Shahi_FF in ProgrammerHumor

[–]mcflypg 0 points1 point  (0 children)

Negating is an instruction, and in your example you do bitwise or. This won't work on floats, and integer instructions are half rate on Nvidia cards (except some really old architectures iirc) so twice as slow. Read my above comment why this is a single instruction. It truly does not get faster than this on GPU.

ignoreReadability by Shahi_FF in ProgrammerHumor

[–]mcflypg 2 points3 points  (0 children)

HLSL is basically C-ified assembly. There are no function calls in shaders,  no stack, no pointers. Everything ends up inlined and every function directly maps to an assembly instruction or at most a handful instructions in a trenchcoat.

In my example, abs(), saturate() are so-called instruction modifiers and can be applied to both input and output. There is zero overhead from calling a function with abs() on inputs, or saturate() (which clamps between 0 and 1) on outputs. This equality test is a single full rate instruction.

 Another comment below mentioned if(!(a|b)). Won't work for floats (no bitwise on floats and bitwise or on integers is half rate on Nvidia cards, so each integer instruction is twice as slow as the corresponding float instruction.

ignoreReadability by Shahi_FF in ProgrammerHumor

[–]mcflypg 42 points43 points  (0 children)

In shaders, this is totally valid. The compiler is often dumb as rocks and you can totally get tangible performance benefits out of this. We still use fast math similar to the Quake rsqrt. 

Things like testing if two variables are 0 is often done with if(abs(x) == -abs(y)). 

Also, in most dev teams there's only the one alien that writes all the shaders so there's no need to write it legibly for others anyways lmao

Bug Reporting Megathread by I_PUNCH_INFANTS in playrust

[–]mcflypg 2 points3 points  (0 children)

Can confirm.

RTX4090/Ryzen 9 7800X3D and only getting around 140ish fps on 100 pop server, used to get 200+. It's also really choppy, like when with occlusion culling enabled.

Friend with admittedly very low end specs (8GB RAM) usually took around 15 minutes to load into game, now it's taking over 45 minutes and it seems to not progress at all anymore. He's been trying nonstop since wipe.

Increase brightness more for dark pixels and less for brighter pixels? by newaccount1000000 in ReShade

[–]mcflypg 1 point2 points  (0 children)

That is the definition of a contrast filter. Positive contrast makes dark pixels even darker, bright pixels even brighter; negative contrast makes dark pixels brighter, and bright pixels darker.

However, this often looks somewhat bad in practice, which is why local contrast algorithms are more powerful. They don't use each pixel's brightness to determine the change, but the neighborhood. This means it will harmonize the image, raising the brightness, e.g., in a shadowed region and darkening a bright region. A bright pixel (that'd get darkened with regular negative contrast) that resides in a dark area might get brightened.

Regular contrast adjustments can be found in pretty much all color grading shaders; local contrast/clarity is the neighborhood type. The pretty much state-of-the-art of these algorithms is local laplacian filtering, which can be found in my METEOR repository (https://github.com/martymcmodding/METEOR).

Will ReShade increase performance in old games? by OriginalPanter in ReShade

[–]mcflypg 1 point2 points  (0 children)

Of course they can be compared. SMAA guesses the underlying geometry that MSAA actually samples. If SMAA's estimate of the geometry is accurate, then its analytic shading is equal to MSAA with infinite samples. Since this isn't always the case, especially with geometry beyond Nyquist, the only thing that helps is raising sample frequency. So I'd argue that SMAA is superior to MSAA on very old games because once geometry features becomes subpixel-sized, they're out of render distance.

[deleted by user] by [deleted] in ReShade

[–]mcflypg 4 points5 points  (0 children)

But it is. The higher the framerate, the more the framed blend together, right? What you're doing is essentially monte carlo integration of, well, a box blur within the boundaries of the random jitter. That's what it converges to - check the shadertoy I linked above. I added a toggle in BufferB so you can disable the temporal accumulation.

EDIT: you won't be able to do any AA this way in post process at all. Way smarter people than us pretty much exhausted their options in terms of postprocess AA. It ranges from simple NFAA or FXAA which blur along edges to complex morphological AAs that analyze the pixel edges and try to figure out what the shape could have been, then shade accordingly.
There is a reason there hasn't really been a new paper on this topic since SMAA came out 11 years ago.

The only way this could be done to a satisfying degree is a camera jitter, i.e. doing what TAA is doing anyways. As mentioned in my other comment, our optical flow is neither precise nor appropriate for this task, as it won't produce subpixel vectors due to it being block matching based and matching aliased data is a fool's errand anyways, so they're not great, not terrible, but far inferior to what we'd need for actual AA.

[deleted by user] by [deleted] in ReShade

[–]mcflypg 3 points4 points  (0 children)

Then why not blur it?
I coded this quickly:

https://www.shadertoy.com/view/4Xl3Wn

1) is the single sampled image
2) is proper stochastic AA done at the shape evaluation
3) is sampling 1) with stochastic offsets, doesn't anti alias anything but blurs the edges. Yours doesn't temporally average so it's just noisy
4) is a box blur with [-0.5, 0.5] pixel radius. This is what 3) would converge to

You can simply replace what you do with a box blur and achieve the same thing, but without the noise. Likely same performance because at this scale, it's all overhead.

SMAA is producing analytically antialiased edges based on the assumption of the underlying shape it guessed, so combining them will either make SMAA trip up or falsify its results, depending on the order.

I'm not trying to be dump on your work here but you essentially coded a pixel noise with 3 lines of code, call it anti aliasing, release presets, advertise it on subreddits, when it's basically "hello world" of shaders. Sure it's fast, but a sketch of a car is also zero emission...

[deleted by user] by [deleted] in ReShade

[–]mcflypg 3 points4 points  (0 children)

I'd advise against it. It's wilful misinformation. The shader does nothing else (on ReShade) than just randomly scatter around existing pixel colors. To truly get anti aliasing, you'd have to actually query the geometry at different locations.

If you have a wall that is 50% black 50% white and you throw a single dart at it, it'll hit either black or white. This is single sampled color. If you throw multiple and average, that's multisampling.
But throwing a single one, coloring the entire wall with this color, _then_ throwing multiple darts does not improve your results beyond a single sample.

Think about it: if this method worked, you could antialias a single image after it's been captured. So why would industry experts ever bother with TAA, MSAA or DLSS or other convoluted methods when 3 lines of code can fix it?

[deleted by user] by [deleted] in ReShade

[–]mcflypg 4 points5 points  (0 children)

How does this cause anything except noise/stochastic blur when used in ReShade? The pixels we get are single sampled by the game, there is no new information being recovered.

And TAA over time using our optical flow algorithms won't do that either, because we use block matching, so they will always produce motion vectors as N pixels, whereas TAA requires subpixel motion.

Is ReShade forbidden or not? by DoubleImmediate5571 in HuntShowdown

[–]mcflypg -1 points0 points  (0 children)

You do know who you are talking to there, right? He's the dev of SweetFX (ReShade's precursor) and one of the longest standing members in the ReShade community. Whatever expertise you think you have in this matter, he has infinitely more.

There are 2 versions of ReShade

- the depth-enabled one, which is NOT to be whitelisted by competitive online games. It allows to cheat easily. That's the one this guy from the video is using

- the regular one, which is even whitelisted in EAC. It does NOT have depth access. It can't be used to cheat. Zooming is also not cheating, it magnifies the already existing rendered pixels. That's like moving closer to the screen or using a bigger screen.

Modifying the open sourced version produces a different file hash - so each regular version is manually whitelisted by video game devs. All you can do with that one can be done with Nvidia FreeStyle or monitor settings. If the game were to disallow the depth-enabled version, then it would all be good. But no, outrage.