170 likes | 316 Views
Overview. [See Video file]. Architecture Overview. Asynchronous Resource Loading. Handle Based Default Resources always available. RenderDevice. Background Loading System. Device Ressource Tracker. Game Thread. Stateless Rendering Architecture. 64 bit Source Key. Draw Command. Shader.
E N D
Overview • [See Video file]
Asynchronous Resource Loading • Handle Based • Default Resources always available RenderDevice Background Loading System Device Ressource Tracker Game Thread
Stateless Rendering Architecture 64 bit Source Key Draw Command Shader Texture Viewport Pass Depth Mesh
Stateless Rendering Architecture 64 bit Source Key Draw Command Mesh Depth Viewport Pass Shader Texture
Shader Cross Compilation System • Mix of Custom Description Language and HLSL • Heavy use of Preprocessor Macros
.shader2 PSSL structSRT_PerMaterial { Texture2D diffuse_texture_srt; SamplerStatediffuse_texture_sampler_srt; }; #define diffuse_texture (srt_data.per_material ->diffuse_texture_srt) #define diffuse_texture_sampler(srt_data.per_material ->diffuse_texture_sampler_srt) (texture_input (texture_2d diffuse_texture) texture_input) (sampler_input (sampler_statediffuse_texture_sampler) sampler_input)
float4 PS( PS_INPUT input, SRT_Globalsrt_data) { output = TEXTURE_2D_SAMPLE_RGBA( diffuse_texture, diffuse_texture_sampler, IL_PIXEL_INPUT(tex) ); }
All resources are bound by convention at runtime • Constants organized by Frequency Frame, Camera, Material, Object • Textures in the order they are defined
Changes since Submission • Support for 3D Textures • Changed from 64x64x4 -> 32x32x16 clusters • Optimized Forward Clustered Shader • GPU Time: 14.82 ms -> 7.86 ms
Changes since Submission • Fixed incorrect cotangent-frame construction in the normal mapping shader • Added Tonemapping • Fixed synchronization issues in the GPU allocator
Restructured Rendering Loop Old Scheme New Scheme 2 / 3 frames Input Latency: 3 / 4 frames
Planned Changes • Add support for Pipeline objects (D3D12, Mantle, Metal) • Restructure the Stateless Draw Command implementation • Add Passes, one pass per logical operation • Reduces overhead from hazard tracking • Reduces sorting overhead, only need to sort local in a pass • Improve Light Clustering • Implement Deferred Rendering Scheme, compare to current Clustered Forward • Better Shading Language, maybe based on the ideas of Spark?
Questions? • Jendrik Illner • Jendrik.illner@gmail.com