aboutsummaryrefslogtreecommitdiff
path: root/engine/src/core-data/Common/MatDefs/Light/Deferred.j3md
blob: c386a61657ead882b16eabbb017e59f0274d6c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
MaterialDef Phong Lighting Deferred {

    MaterialParameters {

        // Use more efficent algorithms to improve performance
        Boolean LowQuality

        // Improve quality at the cost of performance
        Boolean HighQuality

        // Activate shading along the tangent, instead of the normal
        // Requires tangent data to be available on the model.
        Boolean VTangent

        // Use minnaert diffuse instead of lambert
        Boolean Minnaert

        // Use ward specular instead of phong
        Boolean WardIso

        Texture2D DiffuseData
        Texture2D SpecularData
        Texture2D NormalData
        Texture2D DepthData

        Vector3 FrustumCorner
        Vector2 FrustumNearFar
        Matrix4 ViewProjectionMatrixInverse

        // Color ramp, will map diffuse and specular values through it.
        Texture2D ColorRamp
    }

    Technique {
        LightMode MultiPass

        VertexShader GLSL100:   Common/MatDefs/Light/Deferred.vert
        FragmentShader GLSL100: Common/MatDefs/Light/Deferred.frag

        WorldParameters {
            WorldViewProjectionMatrix
            WorldViewMatrix
            ViewMatrix
            CameraPosition
        }

        Defines {
            ATTENUATION : Attenuation
            V_TANGENT : VTangent
            MINNAERT  : Minnaert
            WARDISO   : WardIso
            LOW_QUALITY : LowQuality
            HQ_ATTENUATION : HighQuality
            COLORRAMP : ColorRamp
        }
    }

    Technique FixedFunc {
    }

}