Adding ViroKit. Needs AWSCore :(

This commit is contained in:
John Lyon-Smith
2018-03-27 17:46:15 -07:00
parent 2ab15e7dc1
commit 02e06dface
844 changed files with 86921 additions and 21 deletions

View File

@@ -0,0 +1,43 @@
//
// VROARTransparentShadow.h
// ViroKit
//
// Created by Raj Advani on 8/23/17.
// Copyright © 2017 Viro Media. All rights reserved.
//
#ifndef VROARTShadow_h
#define VROARTShadow_h
#include <memory>
class VROMaterial;
class VROShaderModifier;
/*
Apply this to any material to turn it into a "transparent shadow"
material. These materials are transparent but able to receive shadows
from the shadow-mapping system.
They achieve this through a combination of shader modifiers that:
1. Make the color of the surface black, with alpha 0,
2. Increase the alpha if the surface is in shadow.
This is used to cast virtual shadows on real-world scenes.
*/
class VROARShadow {
public:
static void apply(std::shared_ptr<VROMaterial> material);
static void remove(std::shared_ptr<VROMaterial> material);
private:
static std::shared_ptr<VROShaderModifier> createSurfaceModifier();
static std::shared_ptr<VROShaderModifier> createFragmentModifier();
static std::shared_ptr<VROShaderModifier> createLightingModifier();
};
#endif /* VROARShadow_h */