void CacheEffectParameters(InfiniteGridEffect cloneSource) { diffuseColorParam = Parameters["DiffuseColor"]; worldViewProjectionParam = Parameters["WorldViewProjection"]; texelSizeParam = Parameters["TexelSize"]; invProjectionParam = Parameters["InvProjection"]; InvViewParam = Parameters["InvView"]; planeNormalParam = Parameters["PlaneNormal"]; planeDParam = Parameters["PlaneD"]; InvPlaneMatrixParam = Parameters["InvPlaneMatrix"]; }
protected InfiniteGridEffect(InfiniteGridEffect cloneSource) : base(cloneSource) { CacheEffectParameters(cloneSource); worldViewProjectionParam.SetValue(Matrix.Identity); DiffuseColor = cloneSource.DiffuseColor; TexelSize = cloneSource.TexelSize; InvProjection = cloneSource.InvProjection; InvView = cloneSource.InvView; InvPlaneMatrix = cloneSource.InvPlaneMatrix; PlaneNormal = cloneSource.PlaneNormal; PlaneD = cloneSource.PlaneD; }