A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Sep 13, 2016.
We already talked on Discord, I will post details as soon as our devs provide additional insight.
We're using Unity URP more and more.
But does not support custom lighting.
It interferes with work very much.
Many NPR effect like GGX cartoon shader rely on the custom lighting.
Custom Lighting is specific to the Built-in Renderer, sadly, it does not work with URP. This is specific to Unity, not ASE, you will need to construct your "Custom Lighting" shaders somewhat differently for it using the Unlit URP shader type and the SRP Additional Light node.
We cover this in one of our streams using Lightweight, it's the same for URP, sample in the video description.
Thank you. I'll try
could you please give me a general idea before I get in the wrong direction:
When I want to add some features from a different shader into Amplify Shader Editor (or better, the complete shader ;-) ), do I need to know writing shader code, or is there maybe a tutorial on how to do that on the fly without coding?
Thanks for helping out!
Depends on what you mean, if it's between ASE shaders it's mostly copying and pasting nodes between them. However, if your source is other node editors like Shader Graph, you will have to manually reconstruct the node network.
Coding depends on what you're copying; ideally you'd recreate coded shaders with the nodes available but you can use snippets in Custom Expressions.
Please elaborate, we'd be happy to provide more specific details if you have an example in mind.
I have been wondering if it's possible to mask out objects in front of a translucent object that's hit by its shadow? I'm using world space light direction to make fake translucency.
Depends on how exactly you're going about this; there's no way to distinguish where the shadow is coming from.
I'm trying to create a simple glass material that fakes a refraction by looking up the environment cubemap, but I can't get it to match the skybox cubemap. There's some visible pinching at the poles and the whole texture is distorted. Currently I'm negating the View Direction and then using that to drive a Texture Sample pointing to the cubemap, then binding that to emission. How can I get the texture to lookup the same way as the skybox does?
Check the CubemapReflections example on the built-in samples package.
Paste to canvas: http://paste.amplify.pt/view/raw/551dcc97
Hi Amplify Team!
I am currently evaluating HDRP and i am unable to get Amplify Shader Editor (HD/Lit) Shaders to correctly sort against HDRP Volumetric Fog via a Global Fog Volume
If i set the material to "Transparent" it works, but Opaque does not.
Amplify Shader Editor 1.8.9.012 (latest Store) and v1.8.9.017 (Website)
That's odd, should work just as the default HDRP Materials, we'll check it out and get back to you.
We ran a few tests and it seems to be working as expected, would it be possible to test a sample? We'd appreciate any details regarding your current setup, we're simply testing the default Lit Scene that includes Fog use. (Unity HDRP scene)
For a sample we'd need your Volume Asset and a simple scene, along with shader and material, for a more accurate test. We're available via email@example.com.
interesting- i‘ll test it on an empty project myself and if i still have the issue, send you a sample.
That would be great, thanks for taking the time to set it up.
Please forward it directly to firstname.lastname@example.org so that our devs may access it.
i could replicate it in the default hdrp project that comes with unity
Go to the currently in use "HD Render Pipeline Asset" and set "Lit Shader Mode" to "Forward Only"
Then set "Multisample Anti-aliasing Quality" to "MSAA 2x" or higher
That's great, can you forward us that test project to Support@amplify.pt?
We can schedule additional testing but it's always faster with a sample; I'll update your ticket.
I tested if the bug shows up on more recent unity versions
2020.3.19 LTS - could replicate bug
2021.1.22 - could replicate bug
2021.2.0b13 - could replicate bug
I'll send the test project to your support!
Hi! I'm trying to get reflections from ReflectionProbe using Custom Expression with this code:
float4 sky Data = UNITY_SAMPLE_TEXCUBE(UNITY_SPECCUBE0, worldReflection);
float3 skyColor = DecodeHDR (skyData, unity_SpecCube0_HDR);
. but I get Float3 at the output, and I need sampler2D to connect the SampleTexture node in the future and use mipLevel to blur the resulting Cubmap. Tell me, is there a way to get Sampler2d output? or somehow convert float3 to sampler2d. Tnx.
I'm afraid you can't convert to a Sampler2d, however you might be able to access this in some other way.
Which renderer is this? As an example, in URP you actually have a Reflection Probe node.(this is a Unity provided value)
I use legacy build in render unity3d.
Is there any other way to get a Cubemap from ReflectionProbe Unity into a shader? I need to blur this reflection and I would like to do it using miplevel so as not to load the shader. Maybe there is some way to blur rgba data and not resort to sampler2d conversion.
I was able to find a solution to my problem. Instead of UNITY_SAMPLE_TEXCUBE, I use UNITY_SAMPLE_TEXTURE_LOD. thus, I can use the mip level I need. my code looks like this :
roughness *= 1.7 - 0.7 * roughness;
float4 skyData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, worldReflection, roughness * UNITY_SPECCUBE_LOD_STEPS);
float3 skyColor = DecodeHDR (skyData, unity_SpecCube1_HDR);
I have added another input for roughness and control the mip level with it.
Hey, is there an easy way to do a simple outline shader in HDRP? The outline node doesn't seem to work with that SRP. Thanks.
I'm afraid not, only Built-in and URP.
There's a possible solution, albeit not as elegant, where you can add a second material for the outline and offset/inflate that. (either negatively or by culling the front faces)
Thanks, it's ok, I guess there's no way around it so I'll just live with it.
On to other issues, I was wondering if there's any way to stop this sort of behaviour for billboard shading. I tried using a custom normal on the plane mesh but I could never get what I was looking for and the shading always turned out weird. Did I miss anything like a special billboard node or some additional includes or options? I only turned on the billboard thickbox, I'm using cylindrical and a plane as mesh.
That's an odd billboard issue, would be possible to test it on our end? (email@example.com)
Sure, will send you an email with and example as soon as I can. (SENT)
It looks like a bug with the latest ASE version on Unity 2019.4 and HDRP 7.7.
Once I create a new ASE shader and compile it, I see the error in Unity console that ShaderGraphHeader.hlsl file is missing. I tried to use an older version of ASE (grabbet it from another project) and it works fine.
Could you please check it on your side?
Hey there, thanks for reaching out!
Anything else on the console? Please share the actual console log(copy paste, there might be additional details)
Remove the ASE folder and restart Unity and check the console for any errors or warnings. If no errors are present re-import ASE and check the console for any errors. This should give us some clues to possible issues.
We will also confirm it on our side.
Can you replicate it on a new project? Seems to be working as expected based on our tests.
Yes, I tested it on a clean new HDRP project. Tried to remove ASE from the AssetStore5.x folder and install it in a clean new project.
This happens everytime once I create an ASE shader. For some reason ASE injects this line in the shader code: #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl"
But this version of HDRP doesn't have the ShaderGraphHeader.hlsl file.
Hey there, can you you forward us that new project with the issue present to firstname.lastname@example.org?
At this point it does not seem to be entirely specific to ASE, best to test an example to be sure what's happening there.
does any one know how to use custom expression's call mode and output with void ?
I want to do like this
void DoClipTestToTargetAlphaValue(half alpha)
clip(alpha - _Cutoff);
SurfaceData InitializeSurfaceData(Varyings input)
// albedo & alpha
float4 baseColorFinal = GetFinalBaseColor(input);
output.albedo = baseColorFinal.rgb;
output.alpha = baseColorFinal.a;
DoClipTestToTargetAlphaValue(output.alpha);// <<<<<<< call this function by use custom expression
I sent it. Check it please.
Hi, I am trying to add colour to smoothness, rather than having a default white colour.
By just passing red colour as a test to smoothness input, the smoothness is white.
How should I do this?
Here is the setup:
The smoothness input receives grayscale only. So if you connected RGB to it, then RGBs luminocity will be used as an input.
Just got back to your email, seemed to have been caused by having the wrong HDRP Templates imported; using 7.x seems to correct any related problems. (HDSRPTemplates 7xx - 9xx (Legacy))
We tried replicating it on our end without success, it always imported the correct templates. One of our developers will examine it further for any possible details on what might have happened.
Like @NOT_Lonely mentioned, Smoothness expects a 0-1 value, no color is used in that input. It sounds like you're looking for the Specular Shader Type, not Metallic.
Check these for additional details on how PBR works with Unity:
As per-developer insight: If we understood correctly you want to both register the void function and then use it over your graph. For this you'll need two custom expressions, lets call it A and B. One will register the void function (A) and the other one registers the call to it (B).
On the first one, A, you need to name it exactly like the name of the function itself. You need to turn off the Set Unique toggle so we don't internally change its name to something unique and maintain the exact name you've given.
Then its just a matter of setting the output type to void and fill the code and input ports accordingly. Something like this:
Then the second custom expression, B, you will use to call A. Set it to Call mode, the custom expression name here is irrelevant.
Now just set the correct input port and code to be used by the call.
This next step can be done by two separate ways:
Since A won't be connected to the graph, by default it wont be analyzed and placed over the final shader code. To force ASE to so that you can either
- Set its Auto-Register toggle to on, this will make ASE always register that node.
- Or over B, go to its Dependencies section and register A on it.
The advantage on using the second approach is that will only be registered if some other expression is actually using it, as if Auto-Register is on it will always be registered even if no expression makes use of it.
The latest shot we've shared shows B set with the second approach.
And that's it, please let us know if you have further questions.
As a quick update and reference for people who might search for this:
Amplify fixed a series of HDRP Depth related issues with v1.8.9 rev 19
Volumetric Fog and HDRP Decals now work correctly in Forward Rendering+MSAA!
latest version :
GetFileAssetRelativePath in CustomExpressionNode.cs will cause issue when reference urp shaderlibrary with custom expression node;
get error path #include "../../../Assetses/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
Is this error specific to one of your shaders? Please elaborate on what exactly you're using and let us know if you can actually create URP shaders, otherwise we would be happy to help debug the issue.
Than you for previous reply (#6987), it helped.
I have another problem with double-sided transparent shader. I get weird glitch where the back-face interferes with the front-face and causes bad blending, between these two faces. It is easy to check on a simple cone mesh, when you rotate camera around the object. Is it possible to solve this somehow?
(p.s. it seems it is related to UV position, as the edge of glitch matches UV shell's edge position?)
Hey there, glad the previous post helped.
Depends on the actual problem, Unity has a few caveats when it comes to transparency sorting.
Try enabling the Extra Depth Pass, assuming you're still using the Surface Standard shader type. (set your Blend Mode to Custom)