crest: Enable Shader API does not function without changing underwater appearance

Is there an existing issue for this?

  • I have searched the existing issues.

Have you checked the documentation to resolve your problem?

  • I have read the linked documentation and could not resolve my issue.

Current Behavior

Enable Shader API moves the command buffer to/from before/after forward alpha which enables transparent shaders to render after the fog. While this is desirable, it does not seem like it works with the rest of the features (the docs say this is in β€œPreview This feature is in preview and may change in the future.”) _camera.AddCommandBuffer(_enableShaderAPI ? CameraEvent.BeforeForwardAlpha : CameraEvent.AfterForwardAlpha, _underwaterEffectCommandBuffer);

I have been unable to use this feature because it alters the appearance of the surface / underwater rendering while in an ocean environment, not a mask / contained area with limited settings or short view distance.

Expected Behavior

Enabling the Shader API should not alter the appearance of the ocean shader, lighting, or create artifacts.

Steps To Reproduce

  1. Open Main.unity

  2. Play

  3. Go underwater

  4. Turn on the shader api

  5. Adjust settings to see a bit further image

  6. Observer on / off behavior of shader api

Off: image

On: image

Unity Version

2021.3.26

Crest Version

4.19

Render Pipeline

Built-In

Editor or Standalone

Editor (Edit Mode), Editor (Play Mode)

Environment

No response

Anything else?

You can sorta work around the API problem by using custom rendering for transparent shaders that have issues using the command buffer and not using the Enable Shader API feature. This does not always work though nor is it desirable.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20

Commits related to this issue

Most upvoted comments

I will look at the shadow one but fixing it requires recalculating the scattering term a second time which could be a bit of a performance hit.

In regards to culling, please open new reports for separate issues to reduce noise in this one.

And yeah that makes sense re disabling underwater culling.

Latest has it fixed for gamma. The line issue is probably related to #1146 instead?

Thanks. That should be all fixed now with latest.

Making a new issue for the artefacts should be enough. The other issues are tied to Depth Fog Density Factor?