examples/RenderStack/example.Sandbox/Store/AmbientOcclusion.cs
/// <summary>
/// Updates ambient occlusion for single model.
/// This version updates point normals.
/// </summary>
Updates ambient occlusion for single model.
This version updates point normals.
Updates ambient occlusion for single model . This version updates point normals .
public void UpdateAmbientOcclusionModel(Model model, Group occluders)
        {
            string mapName = "point_normals_for_ambient_occlusion";
            GeometryMesh mesh = model.Batch.MeshSource as GeometryMesh;
            if(mesh != null)
            {
                Geometry geometry = mesh.Geometry;
                geometry.ComputePointNormals(mapName);
            }
            UpdateAmbientOcclusion(model, occluders);
        }
public void UpdateAmbientOcclusionModel ( Model model , Group occluders ) { string mapName = " " ; GeometryMesh mesh = model . Batch . MeshSource as GeometryMesh ; if ( mesh != null ) { Geometry geometry = mesh . Geometry ; geometry . ComputePointNormals ( mapName ) ; } UpdateAmbientOcclusion ( model , occluders ) ; }
Updates ambient occlusion for single model.
Updates ambient occlusion for single model .
//renderer.PartialGLStateResetToDefaults(); //aoHemicubeRenderer.ProgramOverride = renderer.Programs["LightOccluder"];
model
Model
occluders
Group