Closed Revmatek closed 5 months ago
Does changing the Clear Flags to Skybox solve it?
Does changing the Clear Flags to Skybox solve it?
Changing the Clear Flags does not seem to have an effect. The clear flags for the image above is with Skybox.
Is that on the OceanPlanarReflections script? Otherwise can you remove the * saturate(refl.a)
and see if it improves from the following line:
https://github.com/wave-harmonic/crest/blob/0be7cca7660b44150ec2321825565ed626896b4a/crest/Assets/Crest/Crest/Shaders/OceanReflection.hlsl#L29
OceanPlanarReflections
This is OceanPlanarReflections script, yes. Disabling saturate does have an effect and makes the tree leaves appear, but causes other more obvious problems with reflections / darkness on the surface
That image looks like OceanPlanarReflections > Clear Flags is not set to Skybox. Unless your skybox does not write alpha which would be strange. Try testing with Unity's procedural skybox.
That image looks like OceanPlanarReflections > Clear Flags is not set to Skybox. Unless your skybox does not write alpha which would be strange. Try testing with Unity's procedural skybox.
It seems unrelated to the skybox. I tried it with default and a few others. Doesn't change. It also does not seem related to OceanPlanarReflections being on
Can you provide a screenshot of the OceanPlanarReflections component?
Can you provide a screenshot of the OceanPlanarReflections component?
Can you provide a screenshot of the OceanPlanarReflections component?
Well I guess that solves that mystery. I was not aware you were referring to Clear flags on this script vs the camera.
Thanks for the help!
No worries. Does it work correctly if you remove the reflection alpha modification?
No worries. Does it work correctly if you remove the reflection alpha modification?
Yes, it does appear to be working correctly now.
It does seem to wash out a bit after I stop moving the camera but it is mostly fine. Definitely an improvement.
Seems to depend on the angles and only with trees
I'm not sure why there is a distinction between the transparency in the standard shaders and the custom / tree shaders, obviously depends on what each shader is doing I guess.
Perfect. That could be a combination of fresnel and colours blending.
I'll make Skybox the default as prefer to have things work over an optimisation. I'll document this in the tooltip and somewhere in the documentation too.
Fixed in 4.20.
Is there an existing issue for this?
Have you checked the documentation to resolve your problem?
Current Behavior
Planar reflections texture does not show custom shaders / transparency. It may be custom shaders in general if I recall. I think it works for most standard shaders.
Note: that the palm leaves are not visible in the reflection.
My primary concern for this is the tree leaves not showing up. This example has hidden shaders on the tree which I cannot redo easily. The example light blue cube is something I can modify to add support if that is possible.
Expected Behavior
There should be some sort of way to add support for transparency in custom shaders (seems to work fine for Standard Shaders with transparency, which may exclude all forms of tree shader)
Steps To Reproduce
1) Create a scene with Planar reflections 2) Add some objects using custom shaders and transparency or Speed Tree (or similar Tree Creator shader) 3) Observe missing reflections
Unity Version
2021.3.26
Crest Version
4.19
Render Pipeline
Built-In
Editor or Standalone
Editor (Edit Mode), Editor (Play Mode), Standalone
Environment
No response
Anything else?
Filling this out here while investigating other issues, this was in my backlog, not terribly important but probably a bug somewhere. I investigated it a one point and ended up in a shader somewhere that was applying transparency to the planar reflection texture or something... I don't recall the specifics. I am not sure if there is some workaround to this I am unaware of, something I need to add in the shaders perhaps.