[Music] hello my name is Graham volatile and I'm a rendering engineer for the Frostbite labs team and Electronic Arts this presentation will cover the various features improvements and optimizations developed for our 4k checkerboard technology that shift in battlefield 1 on ps4 as well as in Mass Effect Andromeda and a majority of other titles moving forward first I'd like to discuss our motivation frostbite Labs has been focusing on a number of longer-term projects to advance games graphics and storytelling in addition some shorter term work has been completed such as a strong push to efficiently target higher perceived resolutions with the frostbite engine and games here's a screenshot of Mass
Effect Andromeda running at 1080p on a ps4 Pro and here's a screenshot of this environment 1800 P which offers a substantially higher increase in visual fidelity compared to the 1080p version and here's a screenshot of this environment running at 2160p or 4k resolution which adds some additional quality I do apologize for the camera delta's it was tricky to get the exact same view in the scene due to some gameplay let's look at the difference in detail for the highlighted region comparing the left version which is 1080p to the right version at 4k you can see how much more detail and crispness the high resolution offers looking at another highlighted region you can clearly see how much of the original art intention is being lost due to the undersampling looking another
highlighted region this is a similar case and one last region you can see how much of the details are blurred out compared to the high resolution version over the past few years visual fidelity and complexity has greatly increased accredited to an order of magnitude increase in both available memory and primitive rates as well as algorithmic advances with huge computational demands like PBR dynamic GI SSR and others comparing previous generation consoles to current generation the number of display pixels was roughly doubled but scene complexity has increased dramatically it's about time that perceived resolution got a bump as well in this screenshot you can see the type of detailed environments that are being rendered in modern games scenes like
this generally require reasonably high resolution in order to reduce aliasing artifacts and showcase the details desired by the artist's rendering extremely detailed geometry requires a much higher sampling frequency or ugly geometric aliasing occurs without additional high resolution geometry information the bulk of techniques that exists for removing geometric aliasing sacrificed overall image quality in favor of temporal stability previously frostbite had deferred MSAA support but as it was an ongoing maintenance type mer it was removed in order to reduce complexity in our rendering and while acceptable software solutions exist sony recently added new hardware features to ps4 pro that allowed us to more easily and efficiently implement higher resolution rendering the brute force approach of rendering native 4k is not doable for the majority of engines or games since current Hardware is largely bottlenecked by bandwidth a very
practical method to reduce the shading cost of the image is by shading only a subset of pixels in the majority of the graphics pipeline while geometry information is computed for all pixels some of the information is lost but with the 4k sampling rate most of the adjacent pixels will have strongly correlated shading values as long as they all belong to the same surface a high quality geometry aware resolve is performed to reconstruct the missing information here is some history around how this particular checkerboard came to be there were some algorithms and prototypes at Sony that utilized object IDs for edge detection as well as using EQ AAA for higher resolution depth Killzone Shadowfall then shipped with temporal super resolution and a differential blending operator then the ps4 Pro was architected to include some hardware features aimed at more easily and efficiently supporting alternating
packed checkerboard sampling as well as some initial implementations in a few first party games last GDC Jolla is at Ubisoft had a great presentation on ms a checkerboard implementation in Rainbow six siege that helped bring more awareness to the overall idea and now we have implemented our own support in frostbite for the alternating packed checkerboard approach which shipped in battlefield 1 and Mass Effect Andromeda we tried a number of high resolution techniques with varying success the results were evaluated on a 50-inch TV at livingroom distance not on a computer monitor 2 feet from your face we started with native 4k and while it looks excellent the performance is unacceptable other resolutions were evaluated like 1440p and 1800 P and while 1440p was within budget we found that 1800 P offered a much more dramatic improvement over 900 P one way to think about it is compared to the previous console generation is that
1440p is to 720p as 1800 P is to 900 P while resolution can be a subjective topic recall the difference in quality for 720p versus 900 P on a 1080p screen extra resolution has a roughly linear performance cost at least for deferred passes but will give diminishing returns in perceived quality here's a scene from battlefield 1 at native 4k resolution 29 milliseconds for a 60 Hertz game is obviously a showstopper even rendering at 1800 P native and scaling up to 4k has a cost of 21 milliseconds which is also too high there's been a lot of buzz in the last few years about variable shading rates and checkerboard rendering is a practical idea that could be used to greatly increase their resolution without much performance cost some
experiments have been done to implement checkerboard using stencil while we didn't bother with implementing this is important to cover for posterity sin selector board can be done in 1x1 blocks but please don't ever ever do this the GPU shades in 2x2 quads so you'll pay the shading cost of native 4k but then throw away half of the work in order to get a performance game stencil checkerboard can be done in two by two blocks but now the sampling distribution is terrible with less correlation you get great coverage in a 2x2 block within a huge hall in many cases you'll get diluted color bits every second quad that are quite blurry and in order to solve that you end up luring even more so what's the point initially we looked into a 2x color and 4x depth checkerboard the portability of this technique is compelling but is very invasive to the rendering pipeline that's practically all shaders and render passes need to be modified
additionally this form of checkerboard isn't the most optimal configuration some other variants like 2x color and 2x depth have shipped in some games would have to sacrifice some performance to remain portable across various IH fees another experiment was to use one X color to keep most of the rendering pipeline unchanged but render with 4x depth samples a geometry aware up sample from 1080p to 4k was performed with the idea of maintaining the hard edges this was a good idea and is similar to SRA a accept this trades the second pass normal and bilateral of SRA a with a single pass IDs and custom reconstruction in the end the quality wasn't high enough and while it could have been improved over time the implementation cost between 4k geometry and 4k checkerboard was comparable as such this approach was abandoned early to focus on a superior technique
eventually we settled on a very efficient pact checkerboard technique we started with the ps4 Pro reference implementation customized and optimized it further and incorporated into our own temporal anti-aliasing the PAC checkerboard approach gave a substantial boost to image quality and clarity while maintaining a 60 Hertz target and shipped with very positive reviews in battlefield one here's an example scene that rendered with the PAC checkerboard approach looking at the highlighted area zoomed in prior to checkerboard resolve you can see which samples were shaded and which samples were not reconstructing unshaded samples or holes in the current frame with information from the previous frame as well as using high resolution geometry information can produce a resolved result at very high
quality using the PAC checkerboard rendering we're able to take this scene reach comparable image quality to 1800 P native yet stay within our performance target here's a close-up of the scene showing 1800 P native and here's a close-up of the scene showing 1800 Peach checkerboard now I'll go over our specific checkerboard layout and configuration a MDEQ AAA is a superset of MSA a and provides quite a number of interesting hardware features one such feature is the ability to store fewer color fragments than depth fragments which is exploited by the 4k checkerboard technique the most common checkerboard configuration is to use two
X color and 2x or 4x depth sorry this approach is nice due to its high portability and derivatives do not require any sort of adjustment but this approach is inefficient due to the way that the shading quad are packed the example shown here will shade eight samples but only store two of them our later layout is using one X color with two X depth with the packed checkerboard approach you only get one shading quad in this case four samples are shaded with two samples being stored on average the samples are 30% closer together which results in a very measurable performance win projector board rendering the sample locations are alternated each frame for configuring EQ AAA the scan converter must be informed how many samples to produce per pixel as well as the absolute distance from the pixel center of the sample furthest from the pixel center in the case of our checkerboard layout the samples are at 1/4 and negative 1/4 from the pixel
center now I'll go over the various features that were used to remove or reduce checkerboard artifacts providing an increase in visual fidelity arguably the most important feature of our checkerboard is the object and primitive ID buffer used by the resolve the IDs are generated at a higher resolution than shading for each geometry sample an identifier is stored in an image buffer which uniquely identifies object and primitives that are visible at that sample instance drawers provide a separate object ID per instance by binding an array of object IDs 1 per instance and tessellated drawers are given a primitive ID per input patch the ID buffer can be written out during any full geometry pass which is either a depth an idea only pass or the main scene render since the depth Pass will
typically consume less memory bandwidth and the shading passes is advantageous to write the IDs at this point on ps4 Pro the ID generation is performed without any shader involvement so the impact on a synchronous compute jobs in parallel is minimized it is not recommended to add an additional depth pass just for ID generation as the increased CPU and GPU overhead is not worth the benefit without an existing depth only pass the ID generation is easy to integrate into the main shading pass doing so will cause the ID generation to compete with memory bandwidth but at least the idea only samples don't pay for the shading the IDS themselves are stored as 32-bit 16-bit or 8-bit values we use an ID to this 31 bits wide with the most significant bit of the parameter ignored by the hardware object ID is 14 bit with an optional 17 bit primitive ID arithmetic aliy added which is reset to
0 at the end of each instance or draw the ID buffer is a color target bound as the 8th MRT a shader cannot export to this target when IDs are being generated and since the ID buffer is treated like a color target it uses both the C B's data paths and the color target tile modes it is also safe to set this with a null pixel shader because the 8 MRT is not treated as a pixel shader target when ID propagation has been enabled an alternative way to produce object IDs is to export them from the vertex shader however this could reduce the number of vs wavefronts that can be active on the chip at a time there are many other interesting use cases for the object ID buffer but for this presentation it will be used in the checker board resolve to improve the final image quality here is a complex scene from battlefield 1 with
a number of unique objects this is a visualization of just the object IDs in the scene and here is a visualization of the primitive IDs in the scene remember what I said about the object and primitive IDs being a bit different for the tessellation how it's done at the input patch level you look at the bottom left of that screenshot you can see that our number of adjacent triangles the same color that's because the idea is assigned prior to tessellation expansion when rendering a checkerboard with any pixel shaders that use implicit gradients for mipmap selection gradient adjust must be configured otherwise graphical artifacts will occur on the left you can see the expected gradient but on the right you can see what the real gradient is the horizontal gradient is twice the expected value and the
vertical gradient is stretched and rotated 45 degrees which resembles bad anisotropic filtering in order to correct for the rectangular pixels we need to apply a non uniform rescale because of this we can't use LOD bias as a scales uniformly instead we use a gradient fetch with rescaled coordinates the adjustment is done by applying a 2x2 affine transform to the derivatives of the texture coordinates if checkerboard is disabled an identity transform is used with no measurable performance impact this approach allows us to avoid having an extra copy of all our shader permutations for the adjusted versus unadjusted case and in frostbite it's about eighty thousand two hundred thousand shaders with our generated pipelines so that's an important thing for us when checkerboard is enabled the adjustment alternates between the two
forms that you see here the result will be texture coordinates that have been adjusted to account for the pac checkerboard manual gradient correction in the shader does come at a price for calculating the adjusted derivatives which is roughly 10% extra cost in maingi buffer shading sample grad issue is more expensive than normal fetch though there is no change in bandwidth or latency and the fetch and filter costs are unaffected other than ALU cost there is also increased register pressure as the derivatives need to be kept around need to be careful that the gradient adjust doesn't hurt your hurt your occupancy at least on the critical path however we only shade half the pixels and not all instructions in the arrrf etch overall this is a win the ps4
Pro added special hardware and compiler support to apply the affine transform directly in the texture unit with no registry usage on this platform just turned the feature on at no ALU or V GPR cost here are two images courtesy of sucker-punch which clearly show the value of gradient adjustment in these images you can see a curved surface going into the screen and a scrolling text advertisement which is selecting a lower lip earlier than it should resulting in very blocky rendering most cases of gradient adjust can be solved with an automatic adjust performed in the texture unit but cases like custom filtering or virtual texturing need to be manually corrected in this magnified testing showing some horrible programmer art thank you very much you can see two
alternating frames with regions of blurriness due to lack of gradient adjust in the virtual texture sampling it is exacerbated by anisotropic filtering because the skewed gradients will cause the filtering to behave more like a blur and here is the same test scene with explicitly adjusted texture gradients in the virtual texture lookup the flickering stabilizes and the correct nip levels are being chosen now in addition to gradient adjust the Bary centric evaluation also needs to be corrected to use sample positions instead of pixel positions without barycentric see valuated at sample positions texture fidelity and smoothness will be affected in this example notice the loss of detail on the vertical lines of the background and a more rough appearance of the vegetation
speaking of vegetation battlefield one has a lot of it and correctly resolving alpha tested objects with checkerboard rendering is quite challenging alpha test shaders compute the depth or coverage of a pixel inside the shader instead of relying on the scan converted to determine these parameters if these shaders are run at pixel rate all samples in the pixel share the output of a single shader invocation resulting in IDs that are at shading rate instead of full rate this presents quite a problem with checkerboard hole reconstruction the solution is to run the pixel shader for each sample in the image instead of just once per pixel to be able to generate full resolution depth and ID values the hardware will unroll each pixel quad creating a shading quad per
sample because unnecessary unrolling can have a severe performance impact due to a large increase in pixel shader work it is important to switch off the unrolling whenever it is not needed first all alpha tested geometry will run a minimal pass to compute the coverage and/or depth since this pass is unrolled the shader needs to be as fast as possible next all alpha tested geometry runs at the expense of shading Pass which computes the actual color values this pass has performed a pixel rate and with depth equals testing with the previous coverage pass the expense of shading operations benefit from maximal hidden surface removal in order for the depth equals test to work correctly the positions written by the coverage pass and the shading pass need to exactly match so make sure that
your positions are invariant other or otherwise there can be subtle differences in the computed vertex positions which can lead to z-fighting in the shading path causing holes one approach is to disable fast math for everything that goes into the position we did this on all our vertex shaders with no measurable performance cost here's another test scene with Austin programmer art shaded low resolution to make the artifacts on the Alpha tested vegetation more apparent here is the same scene using alpha unroll avoiding all of the nasty artifacts let's go back and forth again visualizing the object and primitive IDs without the unroll shows the lack of high resolution geometry information for the vegetation
this is what the object and primitive IDs look like with the Alpha unrolling enabled I'll go back and forth again now I will cover various optimizations that were done to our checkerboard solution in order to make it affordable especially for our 60 Hertz titles the first optimization to cover is pixel shader invocation control otherwise known as PS invoke every sample position if covered by a triangle can trigger pixel shading work checkerboard uses one X color and two X depth and IDs due to the way that EQ a works in this case half of the shading does not contribute to the final image we can prevent over shading by configuring certain samples to be non shading which brings the amount of pixel shading work back to what it would be with one x depth and IDs on ps4 there's a very simple API to
turn this on but it's definitely not simple under the hood and I don't want your brains to explode so that's this slide another optimization was the usage of FB 16 GCN instructions in our checkerboard resolved shader ps4 pro has support for FP 16 and we used it throughout the checkerboard resolved shader the largest benefit was the ability to greet greatly lower our LDS memory usage this resulted in about a 30% improvement in the resolved shader another important optimization was the implementation of an efficient depth resolve after the ID depth and stencil values are written in the frame it was important that passes not requiring higher resolution depth and ID information be allowed to read read from single sample depth in order to have the def block bandwidth transparent objects
as well as post-processing read from a single sample resolved depth and stencil target as they do not write depth or reasonable IDs higher resolution depth is resolved a single sample after our main G buffer lay down which is used for the remaining passes in the frame until the checkerboard resolve occurs the simple approach is to copy depth with the compute shader but this is slow as it requires full decompression of depth to be readable in the shader during optimization I developed a technique that can resolve depth and stencil to a single sample target without requiring decompression this is done with a nifty hidden feature of the AMD GCN color block or C be the publicly available AMD evergreen acceleration document describes a mode where the Seabee can copy depth to a color target since the CV can read compressed data natively a decompression is not needed this all sounds great but we want a useable depth
target in the end not a color target here's yet another instance where low-level graphics API is can really shine first off because we want 32-bit depth in many cases a dummy shader is used that writes out 0 and the compiler is forced to output 32 bit this is important in order to avoid truncation of depth values when the CV does the blit as mentioned this harder feature is designed to efficiently resolve depth to a color target but we want to depth the target in the end through a lot of trial and error I found a single tiling mode that matched up between color and depth layouts 2d non displayable thin and 1xa a depth micro tiling are essentially the same by aliasing the depth target as a color target this technique can resolve multi sample depth to single sample color which is secretly a single sample depth target just the set up is alone is not enough though as we currently would be invoking pixel shader threads that would just output 0 to the destination
depth and stencil need to be disabled copy centroids set to on and copy sample index can be used to specify which depth fragment we want to write to the destination 0 seems like a sensible index to use in all cases for us the main secret here is that the DB render control register has a depth copy bit which will read depth and write it to the red channel in the destination it is important to mention that each tile will remain untouched and not copied either stencil is done in a similar manner except using the stencil copy bit of the DB render control register stencil copy will right through to the green channel which makes sense for what this hardware was designed for but does not work correctly when aliasing the color target as a stencil target as only one channel is present to solve this the CB color info register is programmed to perform a component swap which effectively swizzles the green to red channel on
right here is the dummy shader used for the depth and stencil resolve which as you can see is quite dummy the biggest thing is just outputting 0 and forcing the compiler to 32-bit it's just a placeholder this is what occurs if you only resolve depth and stencil but do not copy and fix up the H tile metadata or high Z zooming in on that area in the top left you can see the invalid blocks of pixels due to broken H tile just copying the depth will only work if the destination depth target does not use H tile however H tile is critical for performance especially at high resolutions like 4k and so we also need to explicitly copy H tile to the destination and patch up relevant bits the copy was accomplished with a very fast compute shader which will keep the
H tile acceleration working correctly on the one X a depth destination and any further writes will compress as expected here is the H tile copy shader which will load for 32-bit H tile values per thread copy them to the destination mark the tiles is expanded the shader copies four values at a time instead of one to avoid being SPI bound this pass will produce a destination H tile that has correct Z ranges and all tiles mark is expanded since that is how the Seabee has copied the depth values across this optimization saved us over one millisecond and leaves both the source and depth stencil fully compressed other than preserving compression the state this technique is great because it's completely bandwidth bound now I will cover the integration of checkerboard
with our post processing after lay down of our checkerboard of G buffer is important to invoke as many post processing steps before the checkerboard resolve is possible the reason is strictly due to the performance cost while certain passes can produce better results when computed at higher resolution the majority of passes do not benefit enough from the quality increase compared to the extremely high performance cost it was very time-consuming and painful work do the initial refactoring of lighting and post process for the checkerboard an evolution of the codebase over time breaks various parts often checkerboard is a new concept to many this is important to Auto chest Auto test the checkerboard pipeline if possible in frost but we have a full auto testing setup where we were able to just add this into our existing test suite and test for it now which is great there are some passes that ignore
geometric information like SSAO or luminance estimation which provide very little visual benefit to be run after the resolve some passes that can benefit from geometric information in order to limit color propagation over an edge can still run at a very low resolution although the render targets are not structurally different from non EQA surfaces their pixels do not correspond to a regular grid this makes linear sampling of the checkerboard surface problematic it also means that the aspect ratio of the buffer is different from a normal sixteen by nine render as an example if a blur Pass is applied to a checkerboard surface the correct thing to do is treat each pixel according to its exact position on the checkerboard in the majority of cases it is possible to get away with treating the buffer as a 1920 by 2160 buffer however to maintain the shape of the blur the horizontal filter should be housed here's a test scene that shows the tiled
lighting before checkerboard correction notice the blockiness of the lighting results in the zoomed in region and here is the same test scene in region after accounting for the checkerboard pixel grid just go back and forth again hopefully the projector shows it this was trivially fixed by applying an offset to the UV used for reconstructing the clip space position this convenience function will return a packed value for checkerboard UV adjustment if checkerboard is disabled the simply return 0 which doesn't apply any sort of adjustment otherwise the return value contains a frame parity bit in the LSB and half Texel width when interpret is a float this packed representation allows us to have a single version of all of
our post-processing shaders regardless of whether or not checkerboard is active and this packing function is what produced the CB pack CB state packed variable being passed in this is an overview of a battlefield 1 frame on ps4 Pro and the associate associated resolution changes the clear up to the velocity vectors are done at 1,800 feet checkerboard then the checkerboard resolve coupled with temporal anti-aliasing outputs a native 1800 P frame which is the resolution used by the remaining passes that do not currently benefit from the checkerboard finally the display mapping and resample is performed which prepares the frame for scan out at native 4k and here is an overview of a Mass Effect Andromeda frame on ps4 Pro the render passes are
very similar to battlefield one except Mass Effect also runs a sprite depth of field pass after the checkerboard resolve and temporal AAA the quality of the final image is greatly dependent on how the color buffers are combined with the high resolution geometry information making the shaders that move the frame 240 resolution a very important part of these techniques the checkerboard resolve is broken into two main parts the spatial component and the temporal component the spatial component exploits the relatively dense sample rate in two ways first only the unshaded samples are resolved and the unshaken the shaded samples are simply passed through second the resolve only looks at the for direct neighbors of the unshaded sample instead of performing a wider search the checkerboard resolve typically does not use depth for performance reasons therefore the color information must be
used to determine if an edge is soft this should only be done for colors produced from the same primitive as there are no cases where we want contribution to a pixel from different objects in the case where none of the surrounding colors are from the same objects an average of all four color samples is used this slide shows a problem with false hard edges the pixel able to see will be resolved using all four of its neighbors resulting in an even blend between red and blue pixels labeled as a and B have an uneven number of red and blue neighbors leading to different blending results applied over the whole quad this would produce a visible diagonal edge the color bounding box will add all color samples from a primitive to a bounding box and YCO CG space and color samples that are from the right object but a different primitive will be considered to be on the right primitive if they are contained in this bounding box it is important to decide what to do
in a single sample is contained in the bounding box here's a test case courtesy of sucker-punch which really shows the problem of single bounding box samples because it is unlikely that other samples passed the test the single sample is copied directly into the destination pixel causing an obvious artifact the problem can be avoided by using a heuristic that compares the single color value to the blended color of all samples from the correct object the heuristic is to help reduce artifacts and highly tessellated yet smooth areas like in this character face let's go back and forth using a distance weighted blend would perform a simple averaging since all four samples are equal distant to the center sample you can see artifacts on the left image where visual continuity
is being interrupted by average pixels the solution is to use a differential blending operator that compares two pairs of opposing color samples and weighting each pairs contribution to the final value higher if the samples in the pair are more similar than the colors of the opposing pair the differential blend operator is much better than a simple averaging but it still has limitations due to its small search radius if both pairs are quite similar there is not enough information to select the appropriate blend this mainly occurs when a single pixel wide texture feature is encountered like in this example where the light background is visible through single pixel wide openings in the foreground geometry the solution is to use the ID buffer to influence the weighting back and forth
this is the differential weighting function which includes ID evaluation the exact formulation is dependent on what color space you operate in such as log space luminance as you can see the operator is quite simple but greatly improves the image quality here are some examples showing how object and our primitive ID can be used to help in separating out unique surfaces it may seem like the inclusion of object and our primitive ID results in a more aliased image but keep in mind that is desirable to keep the hard edges between different objects rather than just blurring everything together and reducing image quality the temporal component uses reprojection to combine the results of the spatial resolve with the color history buffer for the majority of details you can refer to all the great presentations and research already out there especially the work of Brian Karis our temporal a is very similar to this and general ta isn't the
talks focus so I won't be going into much of the details for that I will briefly touch on velocity based reprojection which was updated for checkerboard a static scene over two frames is trivial to reconstruct but an actual game is obviously much more dynamic if there are numerous objects on surfaces in motion yet the pixel grid is stationary because of this we needed to correlate 3d surfaces in motion such that a valid reconstruction of unshaded checkerboard pixels can be performed the correlation is achieved by having surfaces right per pixel velocity vectors which can be used by the reconstruction anti-aliased edges potentially spanned depth and velocity discontinuities in order to make make sure that we don't lose anti-aliasing when reprojected we need to reproject anti-aliased lines as a whole in order to do that we must dilate velocities around them in practice using the frontmost velocity works well in most cases so that's the technique we would
like to use unfortunately to find the frontmost velocity we also need to fetch the depth buffer and doing so is quite expensive this is an overview of our optimized velocity dilation which determines the pixels that need velocity dilation loading depth to compute the frontmost velocity and the pixels that use can use a basic averaging which bypasses the loading of depth the pass-through pixel uses a cross-shaped kernel while the filtered pixel uses a plush tape kernel in this two bug overlay the red pixels are moving edges which require velocity dilation while the unmarked pixels do not here's an overview of the checkerboard resolved shader which processes two pixels per thread the pass through or shaded pixels and the filtered or unshaded pixels you'll note that the spatial resolve occurs within
the same shader as the temporal AAA so that the spatially resolved color is never written back to memory after resolving the spatial and temporal components the results undergo a sharpen filter and then the final frame was written out to memory despite being quite advanced the 4k checkerboard resolve + temporal AAA is essentially a smart blur filter as a result the absence of high-frequency components in an image makes it harder for just observers to discern objects ganglion cells which link the retina to the optic nerve respond acutely to high-frequency image components with a blurred image the brains visual cortex will lack the necessary information to discern objects when a blurry frame applying a sharpen filter to the blurred image will help recover the high-frequency components which which will result in enhanced visual quality be careful to not reintroduce aliasing
or Hall's high frequency and to not introduce ringing or over sharpening here's a screenshot without the sharpening filter applied here is the same scene with the sharpening filter applied before after another example before and after close up before the filter and after I feel like I just gave all of you and I exam once checkerboard was submitted to mainline I started to receive absolutely every artifact related bug report like for the entire game claiming that the cause must be the checkerboard including bugs that existed well before the checkerboard was submitted which is fun adding lots of
debug overlays was a great way to help with debugging and isolate the root cause and whatever rendering component was to blame it was never checkerboard also take advantage of your technical artists and fellow rendering engineers teach them how to tell the difference between an actual actual checkerboard bug and an unrelated system like motion blur you might think those are the exact same bug they're not so get ready for an old-fashioned witch hunt now I want to briefly touch on a couple infrastructure pieces that were indirectly related to the checkerboard rendering perhaps the biggest pain point of the move to 4k rendering was the massive increase of memory usage by the majority of our render targets at the
time we didn't have a fancy system moving and repurposing memory throughout the frame so we had to do some pretty creative reef actors to manual aliasing in very complex systems this extra effort pulled us away from doing further 4k specific improvements that we wanted to do going forward we now have very flexible and efficient approach for managing render target memory and aliasing very interested please go back and watch URIs talk titled frame graph extensible rendering architecture and frostbite it's really good render target aliasing is also super - funded about at times especially when the corruption manifests and the object ID buffer that helps drive our checkerboard resolve the corruption wasn't obvious at the time as the checkerboard resolved errors were noticeable but still quite subtle closer inspection of the memory at this point in time at this point the frame story identified the culprit here this was especially difficult to debug and track down because our memory layouts were also constantly changing frame to frame
due to dynamic resolution scaling developed by Dyson Microsoft another great feature is our dynamic resolution scaling system which also plays nicely with our 4k checkerboard implementation checkerboard is always active but the dynamic resolution scaling will determine what initial checkerboard frame resolution should be based on a running performance heuristic battlefield one contains a number of infrequently running GPU tasks these caused the resolution to adjust in small increments almost every frame which turned out to be not an issue it actually worked with the jitter to provide different variation in sub pixel detail we tried preventing any upscaling if the camera wasn't moving but this resulted in a noticeable lower quality image and also nobody complained about it lastly I will cover performance and future work going back to this
battlefield scene let's look at the performance numbers for it a couple things to note here the ID clear is quite high as there wasn't enough time to implement something better such as using C mask acceleration to mark cleared tiles instead of clearing the backing memory and we had to do this because of our sky not actually writing down IDs this should bring the time down quite a lot the other note is around the three instances of depth stencil and H tile copying the reason it's complicated and specific to how battlefield and Mass Effect are currently rendering a frame other frostbite titles going forward we only require one depth stencil a shall copy on average making the total cost a third of what you see here comparing 1,800 feet checkerboard versus 1,800 P native the checkerboard implementation saves 5.08 milliseconds in the scene making the total frame cost suitable for the 60 Hertz performance target here are some interesting GPU
timers for this scene comparing 1800 P native versus 1800 Peet checkerboard in a lot of cases you can see that the timing is pretty much half of what it was before checkerboard the cases where it's not that like the G buffer is because it's bound by other things in the pipeline like bandwidth for example and here's a scene from Mass Effect Andromeda using checkerboard which shows the timings between 1800 P native and 1800 Peet checkerboard this is a 30 Hertz title so the checkerboard costs as well within the allotted budget the checkerboard specific timers are similar to the battlefield 1 capture except the resolve is much more expensive due to higher quality settings since Mass Effect goes to 30 Hertz title and can afford it here are some interesting GPU timers for
this scene comparing 1800 P native versus 1800 P tracker board we have planned further improvements to the checkerboard resolve as well as optimizations to alpha tested objects so the sample rate coverage is not needed and we also want to get our actual resolution higher which is just more of general optimization work we've also only scratched the surface what the ideas can be used for the general theme is that a number of heuristics can be removed in favour of trivial comparisons such as the Uncharted force ensel based tagging stuff that we could replace with object IDs we plan to implement pack checkerboard and other platforms the ps4 pro has some great hardware features for this but a reasonable workarounds exist for both Xbox and for base ps4 on PC we need EQ a or something like that for all H fees as well as programmable
sample locations for Vulcan and DirectX 12 we also need a fish and driver support for the EQ a depth resolved such the source is left uncompressed and the technique is purely bandwidth bound more forward-looking but also related to high resolution rendering is the notion of using a filtered visibility buffer and decoupled shading and other variable shading rate techniques G buffer performance becomes challenging at high resolutions so classic deferred shading isn't the answer the goal of the visibility buffer is to decouple G buffer from screen resolution which improves performance at high resolutions like 2k 4k and even MSA configurations as well as on some bandwidth-limited platforms I'd like to give a special thanks to the people listed here for their collaboration and feedback was greatly appreciated and with that I'd like you to open it up to
actually questions you have and thank you very much for coming [Applause] hello a nice presentation do you try or I use in any kind of stencil until Sen sorry can you repeat class yeah if you are using or at least trying any kind of stencil stencil here specular until the same not this time as far as I know we're actually we're investigating certain techniques but no okay thank you since you were using eqa did you find any use for the f mask for example for the color resolve with this particular technique you actually don't need to use f mask for it I have some other plans for some of the V buffer stuff may be using f masks
alright that looks like it thank you very much everybody [Applause] you
Auto-generated captions from YouTube — names and numbers may be misheard.
Distilling the key insights…
Game Developers Conference · 2026
Game Developers Conference · 2025
Comments