site: interplayoflight.wordpress.com
Low-level thinking in high-level shading languages 2023
https://interplayoflight.wordpress.com/2023/12/29/low-level-thinking-in-high-level-shading-languages-2023/ [interplayoflight.wordpress.com]
2024-01-01 04:21
tags:
gl
perf
programming
This, and the followup, is a presentation that I recommend as required reading to people wanting to get deeper into shader programming, not just for the knowledge but also the attitude towards shader programming (check compiler output, never assume, always profile). It has been 10 years since it was released though; in those 10 years a lot of things have changed on the GPU/shader model/shader compiler front and not all the suggestions in those presentations are still valid. So I decided to do a refresh with a modern compiler and shader model to see what still holds true and what doesn’t. I will target the RDNA 2 GPU architecture on PC using HLSL, the 6.7 shader model and the DXC compiler (using https://godbolt.org/) in this blog post.
Raytraced Order Independent Transparency
https://interplayoflight.wordpress.com/2023/07/15/raytraced-order-independent-transparency/ [interplayoflight.wordpress.com]
2023-07-29 19:47
tags:
gl
graphics
programming
About a year ago I reviewed a number of Order Independent Transparency (OIT) techniques (part 1, part 2, part 3), each achieving a difference combination of performance, quality and memory requirements. None of them fully solved OIT though and I ended the series wondering what raytraced transparency would look like. Recently I added (some) DXR support to the toy engine and I was curious to see how it would work, so I did a quick implementation.
The implementation was really simple. Since there is no mechanism to sort the nodes of a BLAS/TLAS based on distance from the camera, the ray generation shader keeps tracing rays using the result of the closest hit shader as the origin for the next ray until there is nothing else to hit.
GPU architecture resources
https://interplayoflight.wordpress.com/2020/05/09/gpu-architecture-resources/ [interplayoflight.wordpress.com]
2020-05-09 19:13
tags:
gl
graphics
hardware
links
programming
I am often get asked in DMs about how GPUs work. There is a lot of information on GPU architectures online, one can start with these:
Hybrid screen-space reflections
https://interplayoflight.wordpress.com/2019/09/07/hybrid-screen-space-reflections/ [interplayoflight.wordpress.com]
2019-09-08 19:31
tags:
gl
graphics
programming
As realtime raytracing is slowly, but steadily, gaining traction, a range of opportunities to mix rasteration-based rendering systems with raytracing are starting to become available: hybrid raytracing where rasterisation is used to provide the hit points for the primary rays, hybrid shadows where shadowmaps are combined with raytracing to achieve smooth or higher detail shadows, hybrid antialiasing where raytracing is used to antialias the edges only, hybrid reflections, where raytracing is used to fill-in the areas that screenspace reflections can’t resolve due to lack of information.
Of these, I found the last one particularly interesting: how well can a limited information lighting technique like SSR be combined with a full-scene aware one like raytracing, so I set about exploring this further.
How to Start Learning Graphics Programming
https://interplayoflight.wordpress.com/2018/07/08/how-to-start-learn-graphics-programming/ [interplayoflight.wordpress.com]
2019-01-02 02:29
tags:
gl
graphics
intro-programming
It is a bit nebulous, without doubt, but graphics programming can be approached from different angles, at different stages and degrees of difficulty to suit one’s experience and knowledge.
The key to learning graphics programming, and any programming for that matter, is in my opinion instant gratification and feedback. You must be able to immediately see the output of your code, with a rapid edit/preview iteration cycle.
How Unreal Renders a Frame
https://interplayoflight.wordpress.com/2017/10/25/how-unreal-renders-a-frame/ [interplayoflight.wordpress.com]
2017-10-26 16:15
tags:
gaming
gl
graphics
programming
I was looking around the Unreal source the other day and inspired by some excellent breakdowns of how popular games render a frame, I thought to try something similar with it as well, to study how it renders a frame (with the default settings/scene setup). Since we have access to the source code, it is possible to study the renderer source to see what it does, although it is quite a beast and rendering paths depend a lot on the context so a clean, low-level API call list will be easier to follow (looking into the code to fill in any missing gaps). I put together a simple scene with a few static and dynamic props, a few lights, volumetric fog, transparent objects and a particle effect to cover a large enough range of materials and rendering methods.
source: L