Blazestorm
Supreme [H]ardness
- Joined
- Jan 17, 2007
- Messages
- 6,940
Most posts I see on here are SQL and databases or webpages. Of which I know nothing about.
Anyone else interested in graphics programming or game development?
I've been working on Tile-based Deferred Rendering over the weekend and I'm glad to have it working for the most part (Need it finished for project credit). This is the same technique DICE used for Battlefield 3. I like to browse random whitepapers and talks by companies, most of the time I have no idea what they're talking about. Same for this until I found an example article and program by Andrew Lauritzen. I knew nothing about how compute shaders worked or even what the algorithm was doing.
But seeing his code and stepping through it, I was able to implement my own version of it. It's pretty clever in my opinion. Normally in a pixel shader, you write code to handle a single pixel and have no knowledge about what is happening with the other threads running this shader. You have no shared memory that you can write to, just read from. But with compute shaders, your shader is written with the knowledge you're working with a "thread group" with x,y,z dimensions you specify (z is usually just 1). So instead of running a full-screen pixel shader, you split the screen up into tiles and have each tile be executed by a compute shader. In the end you're still doing per-pixel lighting, but your shader now has shared memory, and a lot more information about neighboring threads, etc. And just gives you the power to do a lot more. The compute shader isn't even part of the main DirectX pipeline, so it's kind of clever to just use it like a pixel shader.
Here's a couple of screenshots from a few hours ago, and yea my scene is pretty lame. But I'm lazy and just used procedurally generated meshes and lots of random numbers. This scene has 2048 point lights and still runs at well above 60fps on my machine at this resolution, if I go fullscreen it sits about 60fps when you're near the center (where most of the lights are). The colors of the tiles in the second screenshot are kind of like a "heatmap" of how many lights are affecting those tiles. Red is 256 or more lights, blue is 0 lights.
Anyone else interested in graphics programming or game development?
I've been working on Tile-based Deferred Rendering over the weekend and I'm glad to have it working for the most part (Need it finished for project credit). This is the same technique DICE used for Battlefield 3. I like to browse random whitepapers and talks by companies, most of the time I have no idea what they're talking about. Same for this until I found an example article and program by Andrew Lauritzen. I knew nothing about how compute shaders worked or even what the algorithm was doing.
But seeing his code and stepping through it, I was able to implement my own version of it. It's pretty clever in my opinion. Normally in a pixel shader, you write code to handle a single pixel and have no knowledge about what is happening with the other threads running this shader. You have no shared memory that you can write to, just read from. But with compute shaders, your shader is written with the knowledge you're working with a "thread group" with x,y,z dimensions you specify (z is usually just 1). So instead of running a full-screen pixel shader, you split the screen up into tiles and have each tile be executed by a compute shader. In the end you're still doing per-pixel lighting, but your shader now has shared memory, and a lot more information about neighboring threads, etc. And just gives you the power to do a lot more. The compute shader isn't even part of the main DirectX pipeline, so it's kind of clever to just use it like a pixel shader.
Here's a couple of screenshots from a few hours ago, and yea my scene is pretty lame. But I'm lazy and just used procedurally generated meshes and lots of random numbers. This scene has 2048 point lights and still runs at well above 60fps on my machine at this resolution, if I go fullscreen it sits about 60fps when you're near the center (where most of the lights are). The colors of the tiles in the second screenshot are kind of like a "heatmap" of how many lights are affecting those tiles. Red is 256 or more lights, blue is 0 lights.