public void Render(RenderTexture source, RenderTexture destination) { shadowSettings.ApplyToMaterial(materials[0]); materials[0].SetTexture("_ShadowTex", target); materials[0].SetFloat("_maxShadowDist", maxShadowDistance); RenderEffects(source, destination); }
public void RenderShadows(RenderTexture color, Texture shadowMap, RenderTexture destination, NprShadowSettings shadowSettings) { if (shadowMap != null) { materials[SHADOWS].SetTexture("_ShadowImageTex", shadowMap); } shadowSettings.ApplyToMaterial(materials[SHADOWS], false); RenderEffect(color, destination, SHADOWS); }
public void RenderAll(RenderTexture color, Texture shadowMap, Texture edgeMap, RenderTexture destination, NprShadowSettings shadowSettings, Color edgeColor) { if (shadowMap != null) { materials[ALL].SetTexture("_ShadowImageTex", shadowMap); } shadowSettings.ApplyToMaterial(materials[ALL], false); materials[ALL].SetTexture("_EdgeMapTex", edgeMap); materials[ALL].SetColor("_edgeColor", edgeColor); RenderEffect(color, destination, ALL); }
public void RenderEdgesShadows(RenderTexture color, Texture shadowMap, Texture edgeMap, Texture background, RenderTexture destination, NprShadowSettings shadowSettings, Color edgeColor, bool useBackgroundColor = true) { if (shadowMap != null) { materials[EDGES_SHADOWS].SetTexture("_ShadowImageTex", shadowMap); } shadowSettings.ApplyToMaterial(materials[EDGES_SHADOWS], false); if (background != null) { materials[EDGES_SHADOWS].SetTexture("_BackGroundTex", background); } materials[EDGES_SHADOWS].SetTexture("_EdgeMapTex", edgeMap); materials[EDGES_SHADOWS].SetColor("_edgeColor", edgeColor); materials[EDGES_SHADOWS].SetInt("_useBackgroundEdgeColor", useBackgroundColor ? 1:0); RenderEffect(color, destination, EDGES_SHADOWS); }