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.
I'm afraid that's one of those features we can't toggle off.
find a pbr lit Transparent mat bug in latest ASE: URP 12 buildin SSAO draw over the TransparentSurface
I have an question to a problem, which I can't solve on my own.
I have the newest version 1.8.9.033 on Unity 2020.3.24. My pipeline is URP.
I want a lit shader, but it should ignore environment lighting. Also ignoring environment reflection.
I created a Universal/PBR shader, connected some textures but then I'm stuck.
When I use "Surface" a got the rendering options, where I can disable ambient light. But using URP these options disappear. I could imagine, that I have to set additional directives (under pass) for my shader... some "pragma noambient" magic, but to be honest: I have no idea, what to write in. Maybe someone can give me some help. In general, bringing the rendering options to urp would be nice.
That might be expected since the transparent shader does not write to depth, does a Shader Graph transparent shader not produce the same result?
This can indeed be confusing as those parameters changed a bit since Built-in on Unity's side, thankfully you can still do it in URP Lit shaders with a Static Switch which allows you to disable specific Shader Features.
Paste each link into your editor window; these nodes are already set to "Auto-Register" so you don't need to plug them into your graph.
For reference, the links above were created using our Share Button which allows you to share selected nodes with other users.
Shader Graph get correct result. I find out when is option enabled ASE have right result
Thank you for your fast reply. I added these nodes (which is pretty easy), but still can't see an effect.
Is there a documentation which lists these shader features? I could't find some.
Your examples seem to turn off specular highlights and reflections... most important would be to turn off environment lightning. So that under Lighting->Environment->Environment Lightning the Intenstity slider does nothing, if the source is set to color and white.
I duplicated your node and tested _ENVIRONMENTLIGHTING_OFF as property and custom name, but it didn't worked.
Ah sorry, misinterpreted your original post, you want something similar to the actual Ambient Toggle on ASE Surface Shaders. Unfortunately, that function(noambient) is not available, afawk, in URP.
Apologies for the lack of details but references for this are a bit scattered, and somewhat lacking, on Unity Documentation and Forum Posts/Answers; it's not really specific to our editor.
Ok, thank you. Good to know, that I not oversee something easy. Then I'll have to find a workaround.
edit some hours later: glad, that urp is so scriptable. my workaround is the following: I used a second camera (as overlay camera for the main) and set object and lights to an extra layer, also the masks. To also exclude ambient lightning I wrote a script, which saves the values of intensity or color at beginCameraRendering event, sets them 0 or black and then writes back endCameraRendering. works as expected.
I've been having problems with point lights resulting in rectangular color through on objects when used with Amplify Shader Editor's Custom Lighting. I tried to drill down and fix the problem and realized it happens with the simplest possible custom lighting shader:
Default surface shader with the custom lighting model selected, running in the built-in render pipeline. Amplify Shader Editor 1.8.9r33, Unity 2019.4 LTS, happens in a fresh project with only ASE imported.
Is this expected behavior? I don't see a way to handle point lighting separately in the shader, and there's nothing in this shader that should care about light attenuation any way.
I'm poking at all of this to try and fix my game's ASE toon shader, which gets these rectangular halos if I have point lights in a bright area. It's as if point lights keep adding some light/color value which I don't have a handle on. This test definitely seems to confirm that suspicion.
The box projected cubemaps look distorted compared to the standard shader. I'm using custom lighting where I plug the "indirect specular light" node to get the reflections. How can I solve this?
The above is the standard shader, the bottom one is ASE
Happy to know you found a workaround! URP may not offer some older options present in Built-in but it's definitely flexible.
Hey there, sorry for your troubles but this is expected. That is the Unity provided value, lighting and shadow information is actually provided by the Attenuation node; which you'd normally multiply with the Light Color node to get the "correct" value.
If you decide to tackle Custom Lighting in URP, keep in mind that you'll need to use the SRP Additional Light node. This is covered on this stream(LWRP used there, same for URP):
Hey there! Would it be possible to compare both on our end?
I just made my own foliage nature shaders with amplify and I love the amplify editor so far. Somehow I managed to even fake branch bending on my own without having pivots and now I'm converting the shaders to URP but how do I make the shaders work with URP Deferred? When I switch the rendering in URP to deferred the models become invisible. I don't see any option to add deferred in the editor?
You shouldn't need to do anything provided that you're using the latest ASE version with URP 12.x or higher. Reach out to us via firstname.lastname@example.org with a shader sample, we'd be happy to have a look. Does depend on the shader, and shader type.
Thanks, I'll send an email as soon as I have some time, my shader types are the default URP lit one and they all seem to disappear on deferred rendering.
Btw right now I have another question. Why isn't HDRP translucency affected by shadow? I tried both deferred and forward, made sure all the HDRP settings are on, and messed around with the diffusion profile. Results have been the same, it's not occluded by shadow and glows from the front too. If I try translucency or sub-surface it makes no difference. Did I miss something or is that this HDRP scattering works? If it is how do I go about making translucency in HDRP?
Never mind I figured it out after some fiddling, great stuff, amplify shader also works very well, it's awesome.
Ah good, happy to hear it!
got projector project in backward ! what's i can do for fix that's thank's
Hey there, can you elaborate? Thanks!
No need, I figured that out too, it looks like, certain types of properties don't work in deferred. That's actually kind of annoying, is there any way to have the shader fallback somehow without me needing to make 2 different shaders? I'm making a foliage shader and the translucency option doesn't work in deferred so I'd like it to not read the translucency when I switch to deferred. I don't know if that's possible.
got projector inside sphere with inversed normal
i make video maybie it's more easy too see what's happen
Do you have any type of falloff on the projector?
Seems to work ok with it, but not without: http://files.amplify.pt/RT/2022/01/gLcEaQqzME.gif
This could be specific to how projectors work.
I'm using the depth fade node to get this outline effect, which works great for the most part. My only issue is that having this shader in the scene doesn't automatically enable the depth texture on the camera, which in my game is turned off by default unless AO is enabled. Is there a flag in the rendering options or elsewhere that will do that for me without having to enable it via script?
Thanks in advance!
Never mind about the translucency when I switch to deferred, I figured out now, lol
Unfortunately, Unity does not handle that automatically for you regardless of the shaders used, it really depends on your project. I should point out that this is not a requirement with Deferred rendering as Unity will always provide the required data there, only Forward rendering requires you to manually activate it.
With the Universal Renderer you can just enable it in the URP Asset Parameters, along with the Opaque texture required for any effects that may use the Grab Color node.
Ah okay, that makes sense. Thanks for the info!
I'm trying to create a a shader that supports GPU instancing. I can set my floats, ints to 'InstancedProperty' and If I debug my shader with "RenderDoc" I can see the GPUinctancing working. When I replaced the 'instancedProperty' with a texture sample there's no 'instancedProperty' type available and I guess the GPUinstancing is not working because the texture is a property type, right?!
So my question is: How can I get GPUinstancing work with a texture? I don't need different textures for this shader so it would be okay to set the texture somwhow to 'const'...
That's not possible AFAIK, check this post: https://forum.unity.com/threads/instance-of-texture.500408/#post-3255686
I recommend looking into Texture Arrays(Texture Sample node) and Sampler States, both can be used with ASE.
This doesn't work for me. I get the following error (multiple times, once for each pass):
Shader error in 'TerrainScatterASE': redefinition of '_AllInstancesTransformBuffer' at line 1083 (on d3d11)
This generates the following after the #pragma's:
And then this after the CBuffer:
and finally this in the vertex shader:
float4x4 _AllInstancesTransformBuffer_Instance = UNITY_ACCESS_INSTANCED_PROP(TerrainScatterASE,_AllInstancesTransformBuffer);
Any help would be appreciated.
Shader error in 'TerrainScatterASE': redefinition of '_AllInstancesTransformBuffer' at line 1083 (on d3d11)
I am trying to rotate an object in the shader as if it were a simple Transform,
For example, I'm using the Rotate About Axis node for LocalVertexOffset.
I duplicated the operation for LocalVertexNormal, and when I output VertexNormal to the color channel, I see the same result as if I rotated the object's Transform and output WorldSpace. This is what it should be.
However, when I connect NormalMap, it looks terrible, as if the light falls in a very strange way. And even changing the value of the rotation angle only for LocalVertexNormal, I could not manually achieve the desired result.
I tried to just rotate each vertex by the transformation matrix (assigned from the script), but the result was the same.
Please advise: how can I use NormalMap after modifying LocalVertexNormal (multiplication by transformation matrix)
(I tried inverting the matrix but that didn't help)
Without connecting NormalMap, no problems with normals are imperceptible
The screenshot shows an attempt to rotate an object by 90 degrees. When rotated 180 degrees, the normals seem to be inverted (the Y channel seems to be)
In fact, what I need in the end is to rotate the object by the matrix (from the script) and render it further as a regular Standard shader
Okay, it looks like I found the problem: in addition to VertexNormal, you also need to modify VertexTangent. I added it manually to the shader and it looks like it works. But I don't understand how to set tangent value in ASE? I don't see such an output.
float4 ase_vertexTangent = v.tangent;
float4 appendResult67 = (ase_vertexTangent);
v.tangent = mul( MatrixInverse, appendResult67 );