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
-
Open Main.unity
-
Play
-
Go underwater
-
Turn on the shader api
-
Adjust settings to see a bit further
-
Observer on / off behavior of shader api
Off:
On:
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
- π Fix #1145 UR Density Factor not supporting Portals — committed to wave-harmonic/crest by magenta404 3 years ago
- π Fix #1145 UR Density Factor not supporting Shader API — committed to Mu-L/crest by magenta404 3 years ago
- π Fix #1145 underwater colors being incorrect with gamma space — committed to wave-harmonic/crest by magenta404 3 years ago
- Fix #1145 Shader API shadow scattering parity — committed to wave-harmonic/crest by magenta404 3 years ago
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?