Skip to content

Conversation

@kohakukun
Copy link
Contributor

Description of Change(s)

  • Implement early fragment test directly in the shader when it is not supported by the graphics API.
  • Add a new test for OIT in usdImagingGL for Packed OIT and OIT
  • Fix recompilation of OIT shaders when garbage collection is called.
  • Add another pass/renderPassState to the oitRenderTask to hold the translucent pass information, this makes an appropriate use of the renderPassState and avoids recompilation of the OIT shaders due to pointer counter
  • Merge oitDepth and oitIndex buffer into a single interleaved buffer
  • Update codeGen to support handling writable and indexed interleaved buffer
  • Fix small bug when querying for a resource with an empty name
  • Updated oit shaders to use the new merged buffer
  • Pack the transmission, depth and color for OIT
  • Pack the RGBA color originally stored in a vec4 into a uvec4
  • Pack the depth and transmission into a uint where the first 8 bits store the transmission(alpha) value and the rest is reserved for the depth. This results in improving the size of the OIT buffer by a factor of 4.

For the old method:

Old hdxOitDataBuffer = 102236160 ~ 97.5MB for a resolution of 1024x780 with mssa vertex stride 16
bytesPerElement = 16 numElements = 1024 * 780 = 6389760 totalSize = 1024 * 780 * 16 = 102236160

For the new method:

New hdxOitColorBuffer = 25559040 ~ 24.3MB for a resolution of 1024x780 with mssa vertex stride 4
bytesPerElement = 4 numElements = 1024 * 780 = 6389760 totalSize = 1024 * 780 * 4 = 25559040

This is defined by the theory in: https://interplayoflight.wordpress.com/2022/06/25/order-independent-transparency-part-1/

Checklist

- Implement early fragment test directly in the shader when it is not
  supported by the graphics API.
- Add a new test for OIT in usdImagingGL for Packed OIT and OIT
- Fix recompilation of OIT shaders when garbage collection is called.
- Add another pass/renderPassState to the oitRenderTask
to hold the translucent pass information, this makes
an appropriate use of the renderPassState and avoids
recompilation of the OIT shaders due to pointer counter
- Merge oitDepth and oitIndex buffer into a single interleaved buffer
- Update codeGen to support handling writable and indexed interleaved
buffer
- Fix small bug when querying for a resource with an empty name
- Updated oit shaders to use the new merged buffer
- Pack the transmission, depth and color for OIT
- Pack the RGBA color originally stored in a vec4 into a uvec4
- Pack the depth and transmission into a uint where the first 8 bits store the
 transmission(alpha) value and the rest is reserved for the depth.
 This results in improving the size of the OIT buffer by a factor of 4.

For the old method:
```
Old hdxOitDataBuffer = 102236160 ~ 97.5MB for a resolution of 1024x780 with mssa vertex stride 16
bytesPerElement = 16 numElements = 1024 * 780 = 6389760 totalSize = 1024 * 780 * 16 = 102236160
```
For the new method:
```
New hdxOitColorBuffer = 25559040 ~ 24.3MB for a resolution of 1024x780 with mssa vertex stride 4
bytesPerElement = 4 numElements = 1024 * 780 = 6389760 totalSize = 1024 * 780 * 4 = 25559040
```

This is defined by the theory in: https://interplayoflight.wordpress.com/2022/06/25/order-independent-transparency-part-1/
@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-11636

(This is an automated message. See here for more information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants