VergilUa / SpeedTreev6HDRP_ASE_Port

SpeedTree v6 HDRP port (via Amplify Shader Editor)
MIT License
14 stars 3 forks source link

Some errors of SpeedTreeHDRP_ASE.shader #3

Closed phishchiang closed 2 years ago

phishchiang commented 2 years ago

Hi, I installed ASE in the HDRP demo project before import the shader, then it has some weird rendering issues in the scene. The material looks almost like a mirror that reflected the environment strangely. Here are some of the error messages from SpeedTreeHDRP_ASE.shader

Shader error in 'Nature/SpeedTreeHDRP_ASE': 'GetDecalSurfaceData': cannot convert from 'float' to 'struct FragInputs' at line 639 (on d3d11)
Shader error in 'Nature/SpeedTreeHDRP_ASE': undeclared identifier 'IsGammaSpace' at line 1150 (on d3d11)

Unity : 2020.3.8f1 HDRP : 10.2.1 ASE : 1.8.9.012

This is the screenshot of the error message : Capture_113

Thank you in advance, please let me know if you have any ideas.

VergilUa commented 2 years ago

Hi, this is most likely due to HDRP version difference. Try re-saving shader from the ASE editor, see if it helps. Last pushed shader version is for 10.5.0, so alternatively, you can try upgrading HDRP package.

phishchiang commented 2 years ago

Hi @VergilUa, Re-saving definitely works on my end, much appreciated! :bow: The only thing that bugs me is the shadow seems to not support the alpha shape from the leaves material. Capture_114 Is this also a way to resolve? Thank you.

VergilUa commented 2 years ago

Hmm, some outputs maybe got disconnected? Not sure. Check if outputs are correct, Alpha and Alpha Clip Threshold.

Also check if alpha clipping is enabled. Try disabling / re-enabling it back again and reconnecting outputs. image image

phishchiang commented 2 years ago

Hi @VergilUa , um...the shadow issue remains the same even if I start a new project and make sure all the settings match yours. (The only difference is SpecularOcculusion, but also tried default and yours) Not sure if the error messages help: ArgumentException: Requested value 'AsIs' was not found. Capture_126 Thank you

VergilUa commented 2 years ago

Hi, try ASE 1.8.8 as well. Perhaps they've changed something in template. If you haven't rolled back shader after upgrading to 10.5, try one that is in the repo.

VergilUa commented 2 years ago

Nvm, I've just checked ASE 1.8.9 on 10.5 and shadow transparency's looking fine: image

Perhaphs something is wrong with shadow / light settings?

Edit: Alternatively, send me a minimal reproduction / project. I'll look into it.

VergilUa commented 2 years ago

@phishchiang I've reproduced it in clean project. Select pine materials in project view, one by one (without multiple selection) and it should fix itself. (make sure you're using shader and inspector from the master branch, not the package version)

image Problem is that sample tree package was made a while ago, and it doesn't have keywords enabled by default, that came later on with inspector changes.

Selecting materials should trigger inspector to enable required keywords on the material automatically. I really should update unitypackages, as they're kinda obsolete now.

VergilUa commented 2 years ago

Updated packages with newer version for the shader + inspector, as well as pine example package. Should be fixed now. Let me know if those work for you, I'll update the issue.

phishchiang commented 2 years ago

@VergilUa Wow, it works!!! Thank you so much and how you respond so fast every time. This is really a magic trick that by selecting the leave material in order to work. Awesome!!🙇‍♂️👍🎉

VergilUa commented 2 years ago

Glad it helped :) Anyway, this shouldn't be an issue with newer example package, so I'll close this issue.