- 博客(15)
- 资源 (1)
- 收藏
- 关注
原创 Light index must be a valid shadow casting light——解决大法GetShadowCasterBounds
GetShadowCasterBounds这个方法可以解决。出现这个错误的原因是,当前灯光没有照射任何物体,但是依然进行了shadowmap的绘制会导致这个错误。if (!m_cullingResults.GetShadowCasterBounds(visibleIndex, out Bounds b)){ m_otherLightsShadowData[index] = new Vector4(-light.shadowStrength, 0, 0, maskChannel); r.
2020-07-23 19:33:08 711
原创 Field of View Bias
在做点光源阴影的时候,渲染cubemap,要有一个field of view bias。这是啥东西?https://catlikecoding.com/unity/tutorials/custom-srp/point-and-spot-shadows/there is always a discontinuity between faces of a cube map, because the orientation of the texture plane suddenly changes 90度
2020-07-18 11:54:33 294
原创 Dimensions of color surface does not match dimensions of depth surface
这个多半是由于摄像机的view 和 project矩阵没有设置正确。
2020-07-18 09:56:57 3749 5
原创 unity post processing stack v2——正式入坑第一弹
https://blog.csdn.net/poem_qianmo/article/details/106753402install之后,就可以将代码移动到assets下,以方便在vs工程中进行查看了。这样vs项目中就可以查看了:
2020-07-17 11:46:17 845
原创 ComputeDirectionalShadowMatricesAndCullingPrimitives这个函数到底在干嘛????
函数原型:public bool ComputeDirectionalShadowMatricesAndCullingPrimitives(int activeLightIndex,int splitIndex,int splitCount,Vector3 splitRatio,int shadowResolution,float shadowNearPlaneOffset,out Matrix4x4 viewMatrix,out Matrix4x4 projMatrix,out Ren
2020-07-11 13:32:54 684 1
原创 srp——平行光阴影的一些坑总结
本文主要学习的是网址:https://catlikecoding.com/unity/tutorials/custom-srp/directional-shadows/的内容。1、坑1——是否注意到系统是否采用了reverse-z了,如果是则要设置正确的投影矩阵: Matrix4x4 ConvertToAtlasMatrix(Matrix4x4 m, Vector2 offset, int split) { if (SystemInfo.usesReversedZBuffer)
2020-07-10 17:02:28 1317
原创 Inline sampler state
https://docs.unity3d.com/2018.3/Documentation/Manual/SL-SamplerStates.htmlhttps://blog.csdn.net/linjf520/article/details/94558038这内联的采样器状态命名有点任性:TEXTURE2D_SHADOW(_DirectionalShadowTex);#define SHADOW_SAMPLER2 xxxx12_linear333_clampddd_compareSAMPLER_C
2020-07-10 10:56:52 202
原创 srp中使用Reflection Probe
Reflection Probe——反射探针1、功能:用来反射天空盒或者反射某一个块的场景。2、表现:在物体上加入了周围场景的颜色。3、实现方式在场景的某个位置创建一个Reflection Probe调整好位置,ok此时如果有天空盒的话:则可以进行bake了:ok,这是bake天空盒。那么场景的物价也是可以bake的,只要把要bake的物价设置为:即可,连同物价一起bake。4、采样reflection probeTEXTURECUBE(unity_SpecCube0);
2020-07-06 19:44:39 953
原创 Baked Light Light Maps and Probes——srp中使用lightprobe和light probe proxy volume(简称LPPV)
本节主要参考:https://catlikecoding.com/unity/tutorials/custom-srp/baked-light/这真实一个很好的unity教程网址。本节主要重点讲解,两个知识点:1、light probe的使用2、light probe proxy volume的使用这两个都是给gi使用的,所谓gi就是全局光照,为了弥补gi对动态物件的影响,unity为我们提供了light probe和light probe proxy volume的两个组件。1、light
2020-07-03 20:02:42 1392
原创 lightprobe四面体插值
https://www.gdcvault.com/play/1015312/Light-Probe-Interpolation-Using-Tetrahedralhttps://www.cnblogs.com/murongxiaopifu/p/8997720.htmlhttps://docs.unity3d.com/ScriptReference/LightProbes-bakedProbes.htmlhttps://docs.unity3d.com/Manual/light-probes-and-s
2020-07-03 17:16:17 1112
原创 fmod中音频变速的问题
在有些需求下,动作要加速,然后音频也要跟着加速,或者反之,动作减速,音频也减速。需求很奇葩……参考的几个网址:https://qa.fmod.com/t/changing-speed-of-audio-without-altering-pitch/13903https://qa.fmod.com/t/adding-a-dsp/12211http://blackchy.com/2018/12/10/2018-12-10-Fmod-Voice-Change/下面是尝试了fmod中两个播放声音的方法,
2020-07-03 14:43:12 1876
原创 srp——gpu instance
https://catlikecoding.com/unity/tutorials/custom-srp/draw-calls/what UnityInstancing.hlsl does is redefine thouse macros to access the instanced data arrays instead.but to make that work it needs to know the index of the object that is currently being r
2020-07-02 15:50:07 475
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人