Question by
Westy66 · Jan 11, 2017 at 10:19 PM ·
shaderprogrammingshadowsinvisible-object
Shader Forge: Shadow reviever invisible quad
Hi guys. Im pretty new to Shader Forge and i would like to ask if anyone knows how to make an invisible quad, which still recieves shadows from directionals (if possible, multiple ones). Its matte shadow from 3ds max basically.
Here is the surface shader which works, i just want to lift it to shaderforge:
Im stuck, beacuse my shadow dissapears when the light faces in a direction when no visible objects can be found.
Shader "FX/Matte Shadow" {
Properties{
_Color("Shadow Color", Color) = (1,1,1,1)
_ShadowInt("Shadow Intensity", Range(0,1)) = 1.0
_Cutoff("Alpha cutoff", Range(0,1)) = 0.5
}
SubShader{
Tags{
"Queue" = "AlphaTest"
"IgnoreProjector" = "True"
"RenderType" = "TransparentCutout"
}
LOD 200
ZWrite off
hangoakt
CGPROGRAM
#pragma surface surf ShadowOnly alphatest:_Cutoff
fixed4 _Color;
float _ShadowInt;
struct Input {
float2 uv_MainTex;
};
inline fixed4 LightingShadowOnly(SurfaceOutput s, fixed3 lightDir, fixed atten)
{
fixed4 c;
c.rgb = lerp(s.Albedo, float3(1.0,1.0,1.0), atten);
c.a = 1.0 - atten;
return c;
}
void surf(Input IN, inout SurfaceOutput o) {
o.Albedo = lerp(float3(1.0,1.0,1.0), _Color.rgb, _ShadowInt);
o.Alpha = 1.0;
}
ENDCG
}
Fallback "Transparent/Cutout/VertexLit"
}
Comment
Your answer
Follow this Question
Related Questions
How to cast terrain detail shadow? 0 Answers
Add hard shadows to a Toon Shader 0 Answers
,Trying to change custom boolean properties of a shadergraph with EnableKeyword 1 Answer
Changing Color/Material using HDRP,Modify The Color of a HDRP material 0 Answers
Is there a way to make some kind of "dynamic" shadow? 1 Answer