We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
对于给出的Shadow,shader (位于Stander->Chapter9->Shaders文件夹中) 发现在第二个Pass之中(Additional Pass),使用了一个UNITY_LIGHT_ATTENUATION(atten,i,i.worldPos);函数(在片元着色器内)。 但是实际上这个效果是只会有衰减效果而没有阴影效果的。
UNITY_LIGHT_ATTENUATION(atten,i,i.worldPos);
第一点是,在这个Pass之中,使用了#pragma multi_compile_fwdadd,而这个预编译指令并不会使得Shader对于不同光源类型产生对应的阴影变化变体。正确的使用方法是#pragma multi_compile_fwdadd_fullshadows,另外,在v2f结构体和顶点着色器中,都没有发现相对应的阴影映射Texture的宏定义。 。 这是刻意为之的嘛,还是另有考虑。
#pragma multi_compile_fwdadd
#pragma multi_compile_fwdadd_fullshadows
但是我当时学这章的时候,头都炸开了,然后看到了Page206页,我的想法是,如果能在之前告诉读者就好了,嗯。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
对于给出的Shadow,shader
(位于Stander->Chapter9->Shaders文件夹中)
发现在第二个Pass之中(Additional Pass),使用了一个
UNITY_LIGHT_ATTENUATION(atten,i,i.worldPos);
函数(在片元着色器内)。但是实际上这个效果是只会有衰减效果而没有阴影效果的。
第一点是,在这个Pass之中,使用了
#pragma multi_compile_fwdadd
,而这个预编译指令并不会使得Shader对于不同光源类型产生对应的阴影变化变体。正确的使用方法是#pragma multi_compile_fwdadd_fullshadows
,另外,在v2f结构体和顶点着色器中,都没有发现相对应的阴影映射Texture的宏定义。。
这是刻意为之的嘛,还是另有考虑。
但是我当时学这章的时候,头都炸开了,然后看到了Page206页,我的想法是,如果能在之前告诉读者就好了,嗯。
The text was updated successfully, but these errors were encountered: