Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12120 for data


Ignore:
Timestamp:
Nov 28, 2018, 10:13:16 AM (6 years ago)
Author:
wiesep
Message:

Implemented material script inheritance for bump mapping

Location:
data/branches/Shader_HS18
Files:
3 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/Shader_HS18/materials/Cube_Lava_Normal.material

    r12117 r12120  
     1import * from "BumpMap.material"
    12// Any number of lights, diffuse
    2 material Cube_Lava_Normal
     3material Cube_Lava_Normal : BumpMap_Base
    34{
    45    technique
    56    {
    6         // Base ambient pass
    77        pass ambient
    88        {
    9           // base colours, not needed for rendering, but as information
    10           // to lighting pass categorisation routine
    11           diffuse 0 0 0
    12           depth_write on
    13           depth_bias 0
    14 
    159        }
    1610        // Now do the lighting pass
     
    1812        pass perlight
    1913        {
    20 
    21             // do this for each light
    22             iteration once_per_light
    23             scene_blend add
    24             depth_write on
    25             depth_bias 1
    26 
    27             // base colours, not needed for rendering, but as information
    28             // to lighting pass categorisation routine
    29             ambient 0 0 0
    30 
    31             // Vertex program reference
    32             vertex_program_ref BumpMapping/BumpMapVP
    33             {
    34                 param_named_auto lightPosition light_position_object_space 0
    35                 param_named_auto worldViewProj worldviewproj_matrix
    36             }
    37 
    38             // Fragment program
    39             fragment_program_ref BumpMapping/BumpMapFP
    40             {
    41                 param_named_auto lightDiffuse light_diffuse_colour 0
    42             }
    43 
    44             // texture shadow receiver program
    45             shadow_receiver_vertex_program_ref BumpMapping/BumpMapVPShadowRcv
    46             {
    47                 param_named_auto lightPosition light_position_object_space 0
    48                 param_named_auto worldViewProj worldviewproj_matrix
    49                 param_named_auto worldMatrix world_matrix
    50                 param_named_auto texViewProj texture_viewproj_matrix
    51             }
    52             // Additive texture shadow receiver program
    53             shadow_receiver_fragment_program_ref BumpMapping/BumpMapFPShadowRcv
    54             {
    55                 param_named_auto lightDiffuse light_diffuse_colour 0
    56             }
    57 
    58             // Vertex program reference
    59             vertex_program_ref BumpMapping/BumpMapVPSpecular
    60             {
    61                 param_named_auto lightPosition light_position_object_space 0
    62                 param_named_auto eyePosition camera_position_object_space
    63                 param_named_auto worldViewProj worldviewproj_matrix
    64             }
    65 
    66             // Fragment program
    67             fragment_program_ref BumpMapping/BumpMapFPSpecular
    68             {
    69                 param_named_auto lightDiffuse light_diffuse_colour 0
    70                 param_named_auto lightSpecular light_specular_colour 0
    71             }
    72 
    73 
    7414            // Base bump map
    7515            texture_unit normalmap
     
    8323        pass decal
    8424        {
    85             // base colours, not needed for rendering, but as information
    86             // to lighting pass categorisation routine
    87             lighting off
    88             depth_write on
    89             depth_bias 2
    90 
    91             scene_blend dest_colour zero
    9225            texture_unit decalmap
    9326            {
Note: See TracChangeset for help on using the changeset viewer.