14-02-2023, 08:30 AM
(This post was last modified: 14-02-2023, 08:30 AM by josemendez.)
(14-02-2023, 01:19 AM)Rearden Wrote: Hey there! Hope you are doing great!
I've checked fluid rendering FAQ, but I haven't seen how to disable shadows of particles. I've tried both forward and deffered Rendering Paths with no luck.
I am using built-in renderer.
Could you please tell me is there any chance to disable shadows of particles?
Thanks in advance!
Hi there!
There's no exposed option to disable particle shadows (taking note to add this in the next version). You can however slightly modify ObiParticleRender.cs, look for the DrawParticlesMethod at the end of the file, and change this line:
Code:
Graphics.DrawMesh(mesh, Matrix4x4.identity, ParticleMaterial, gameObject.layer);
To this:
Code:
Graphics.DrawMesh(mesh, Matrix4x4.identity, ParticleMaterial, gameObject.layer,null,0,null,false);
That last "false" boolean parameter determines whether particles cast shadows or not.
The entire method should end up looking like this:
Code:
private void DrawParticles()
{
if (ParticleMaterial != null)
{
ParticleMaterial.SetFloat("_RadiusScale", radiusScale);
ParticleMaterial.SetColor("_Color", particleColor);
// Send the meshes to be drawn:
if (render)
{
var meshes = ParticleMeshes;
foreach (Mesh mesh in meshes)
Graphics.DrawMesh(mesh, Matrix4x4.identity, ParticleMaterial, gameObject.layer,null,0,null,false);
}
}
}
let me know if I can be of further help,
kind regards,