书中13.2节使用深度纹理实现了运动模糊效果,其中在计算当前像素位置在世界空间下的坐标时使用的代码是这样的: float d ...
#ifdef USING_DIRECTIONAL_LIGHT fixed atten = 1.0; #else float3 lightCoord = mul(_LightMatrix0, float4(i.worldPos, 1)).xyz; fixed atten = tex2D(_LightTexture0, dot ...