All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Common.MatDefs.Shadow.PostShadow.j3md Maven / Gradle / Ivy

The newest version!
MaterialDef Post Shadow {

    MaterialParameters {
        Int BoundDrawBuffer
        Int FilterMode
        Boolean HardwareShadows

        Texture2D ShadowMap0
        Texture2D ShadowMap1
        Texture2D ShadowMap2
        Texture2D ShadowMap3
        //pointLights
        Texture2D ShadowMap4
        Texture2D ShadowMap5
        
        Float ShadowIntensity
        Vector4 Splits
        Vector2 FadeInfo

        Matrix4 LightViewProjectionMatrix0
        Matrix4 LightViewProjectionMatrix1
        Matrix4 LightViewProjectionMatrix2
        Matrix4 LightViewProjectionMatrix3
        //pointLight
        Matrix4 LightViewProjectionMatrix4
        Matrix4 LightViewProjectionMatrix5
        Vector3 LightPos
        Vector3 LightDir

        Float PCFEdge

        Float ShadowMapSize

        Boolean BackfaceShadows: false

    }

    Technique {
        VertexShader   GLSL310 GLSL300 GLSL150 GLSL100:   Common/MatDefs/Shadow/PostShadow.vert
        FragmentShader GLSL310 GLSL300 GLSL150 GLSL100: Common/MatDefs/Shadow/PostShadow.frag

        WorldParameters {
            WorldViewProjectionMatrix
            WorldMatrix
        }

        Defines {
            BOUND_DRAW_BUFFER: BoundDrawBuffer
            HARDWARE_SHADOWS : HardwareShadows
            FILTER_MODE : FilterMode
            PCFEDGE : PCFEdge
            SHADOWMAP_SIZE : ShadowMapSize
            FADE : FadeInfo
            PSSM : Splits
            POINTLIGHT : LightViewProjectionMatrix5
            BACKFACE_SHADOWS: BackfaceShadows
        }

        RenderState {
            Blend Modulate
            DepthWrite Off   
            PolyOffset -0.1 0             
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy