IrayUberSpec shader errors
Hey there,
I keep getting the following errors on the IrayUberSpec shader in Unity:
implicit truncation of vector type
Then this is the rest of the message contents:
Compiling Vertex program with _BLENDMODE_OFF _DOUBLESIDED_ON _DISABLE_SSR_TRANSPARENT
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
Disabled keywords: _SURFACE_TYPE_TRANSPARENT INSTANCING_ON _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY _ADD_PRECOMPUTED_VELOCITY _TRANSPARENT_WRITES_MOTION_VEC _ENABLE_FOG_ON_TRANSPARENT _DISABLE_DECALS _DISABLE_SSR _BLENDMODE_PRESERVE_SPECULAR_LIGHTING ROUGHNESS_IS_SMOOTHNESS_ON UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30
Looking at the actual graph for the shader shows this:
Thanks,
-MH
Comments
Can you tell me the following:
What version of unity are you using?
What version of HDRP are you using?
Are you using HDRP or HDRP + VR or HDRP + DXR (these may not apply to you, but you may have configured them from the HD Render Pipeline Wizard).
What Graphics API are you using (under project settings->player->other settings)?
Try also rerouting the normal map from the "Normal and Height" section instead of the output from the "Normal Blend" node, use just the regular normal (the blue node above it froim the "Lerp", link this output to the normal in the Lit master node and in the "Transform" node under "Daz Legacy Specular Model". (Bascially reroute it so you're not using the blended normals with the bump map).
Sorry for the late reply, I didn't realize you had replied.
I am using only the base HDRP, no VR or DXR. ,
Unity 2020.2.0b7 | HDRP Version 10.0.0-preview.27 using D3D11
I made the changes that you recommended and it seems to have done the trick from what I can tell.
Something I noticed while testing to see if it was working properly was that both the UberSpec and the UberSkin shaders don't seem to know how to handle a situation in which lighting is completely disabled in the scene view, causing both shaders to error out and show purple. While this is not the worst thing ever, I am working on Timeline clips in a rather dark scene so I often disable the lighting to get a quick look at the positioning of things, which may at some point become a legitimate problem if I am needing to see any sort of detail on the models, for positioning of body parts during a fight scene or similar.
I do appreciate your help!
Thanks,
-MH
Wow, that are a good tips here. I have not even tried Unity 2020 with Daz Bridge, yet.
Make a backup of your skin shader at Assets/Daz3D/Shaders/IrayUberSkin.shadergraph and try this variation, please let me know if it fixes the issue for the skin or not:
https://drive.google.com/file/d/10exeWDGsj52siUt8VYwtuEeb-PPxDQcb/view?usp=sharing
It is no longer purple, though, it is black now without lighting. (The other purple one is not skin, it's where the UberSpec is used.)
----- Edit: Nevermind about the notifications below, I found it under the little gear icon, then another little gear icon, then notification preferences. I am used to notification via email for replies to threads usually being on by default on most forums. My bad.
P.S. Is there a way to turn on notifications for the forum? I don't seem to ever get notified when there is a reply, and I don't seem to see where to turn it on?
The issue is subsurface scattering requires a light to work, if you don't provide any lights to the scene it will render as black. If you don't care about SSS for the skin, go into the skin shader and locate the StackLit master node, click the gear icon and disable Subsurface Scattering then hit Save Asset and your shader should now render without a light.
Ah, ok. I understand. I suppose it's probably best if I create a little tool panel in which I can have things like quickly changing out the lighting configuration, or activate a spot light as needed instead of completely turning the lighting off and on. I will experiment with that. I definitely appreciate the assistance on everything though! You guys did some great work here.
I only wish the Unity bridge came out a bit sooner. I ended up buying Reallusions Character Creator 3: Pipeline, just because it was the only fairly straight forward way to accomplish getting characters over, but importing them into CC3 was a pain of it's own and it often merged skinned mesh objects that weren't meant to be merged and messed up all the skin weights. With the Daz => Unity bridge, first try bringing something over it was basically perfect, minus a few items like necklaces or other similar things being slightly off or under the skin, which is nothing compared to what I had to deal with, with CC3, like opposite sides of the body had clothing merged together (a glove on either hand were just one mesh obect, a sword was part of a sleeve, etc).
This has been a breeze to work with, so huge thumbs up from me.
The only thing that I still wish was easier/had a better workflow would be being able to take a bunch of individual poses and batch export them separetly so I could use something like Unitys uMotion animation suite and import each pose as a separate enimation clip, place each pose clip a few frames apart and use them as a solid base to create an actual animated clip.
Thanks again, though. Keep up the great work.