Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference renderer work #12

Merged
merged 16 commits into from
May 3, 2024
Merged

reference renderer work #12

merged 16 commits into from
May 3, 2024

Conversation

hoffstadt
Copy link
Member

Purpose

The purpose of this pull request (PR) is to support efforts towards a 1.0 reference renderer. These contributions cover several areas including fixes, improvements, and new features.

Deferred + Forward Physics Based Renderer Implementation

With this PR, the reference renderer now uses a forward rendering pass for transparent and more complex materials (clear coat, iridescent, etc.). For opaque objects a deferred rendering technique is used. Both pipelines are physics-based rendering and support image-based lighting.

Picture1

Skinning Operation were moved to compute shaders

Prior to this PR, skinning was performed in the pixel shader. This required additional shader permutations for skinned vs nonskinned meshes. It also duplicated the skinning operations if skinned meshes were used in multiple passes. Now, compute shaders are run once per pass for skinned meshes.

Current Frame Graph

With the changes of this PR, the current frame graph looks like the following:
Picture2

Misc.

Increased the allowable bind groups per compute shader

Prior to this PR, compute shaders were only allowed a single bind group. Now they are allowed up to 3 + a dynamic binding identical to the system used for graphics shaders.

Exposed sampler mipmap filtering mode

Prior to this PR, the mipmap filtering mode of samplers were set to NEAREST. Now the filtering mode is a field in the sampler description used to create samplers.

Improved Metal backend's method for ensuring heap residency

Prior to this PR, before draw calls & dispatches were executed, every heap was made resident. With the improvements included here, only the necessary heaps for the current work are made resident. Further improvements will be made in this area.

Fixed Metal backend's copy buffer to texture function

An issue was discovered and fixed where specifying a textures mip & array levels were ignoring.

Fixed Metal backend's create compute shader function

An issue was discovered and fixed where a compute shaders entry function override was ignored.

Future Reference Renderer Work

  • reimplement clear coat materials
  • reimplement iridescent materials
  • reimplement specular-glossiness definied materials
  • reimplement index of fraction
  • reimplement sheen materials
  • reimplement anisotropic materials
  • reimplement shadows
  • implement decals
  • reimplement highlighting & pixel perfect picking
  • reimplement morphing
  • reimplement shader hot reload
  • reimplement shader debug mode

@hoffstadt hoffstadt added backend: Metal specific to Metal priority: Normal normal priority extension: Graphics related to low level graphics extension extension: Renderer related to reference renderer extension type: Feature related to a new feature type: Improvement related to an improvement type: Bug bug extension: Job related to job extension labels May 2, 2024
@hoffstadt hoffstadt self-assigned this May 2, 2024
@hoffstadt hoffstadt force-pushed the dev branch 2 times, most recently from 6bd9781 to 9f9cf6d Compare May 3, 2024 12:38
@hoffstadt hoffstadt force-pushed the dev branch 2 times, most recently from 3ad74be to 6415c7e Compare May 3, 2024 14:54
@hoffstadt hoffstadt merged commit e5f92ed into master May 3, 2024
14 checks passed
@hoffstadt hoffstadt deleted the dev branch May 3, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Metal specific to Metal extension: Graphics related to low level graphics extension extension: Job related to job extension extension: Renderer related to reference renderer extension priority: Normal normal priority type: Bug bug type: Feature related to a new feature type: Improvement related to an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant