zoukankan      html  css  js  c++  java
  • 材质脚本属性

    每帧进行渲染的时候 在一个technique里 有一个pass就渲染一遍 三个pass就是渲染三遍 每帧 这里的pass和硬件的 渲染通路对应

    顶层Material属性 
     
    属性名                   值的格式                  描述 

    lod_distances               <d1> [<d2> ... <dn>]        LOD的距离列表

    receive_shadows             <on>|<off>                  阴影是否会投在这个物体上(默认为on)  

    transparency_casts_shadows  <on>|<off>                  透明物体是否投射阴影

    set_texture_alias           <alias_name> <texture_name> 重命名纹理

    Technique 属性 
        
    属性名                    值的格式         描述 

    scheme                       <name>            这个technique所属的scheme

    lod_index                    <number>          这个technique所使用的LOD层(默认为0)

    Pass 属性 

    属性名                 值的格式                     描述 

    ambient                  <r> <g> <b> [<a>] |             这个pass的环境光颜色
                             <vertex color>                  (默认为 1.0 1.0 1.0 1.0)

    diffuse                  <r> <g> <b> [<a>] |             这个pass的漫反射颜色
                             <vertex color>                  (默认为 1.0 1.0 1.0 1.0)

    specular                 <r> <g> <b> [<a>] |             这个pass的镜面颜色
                             <vertex color>                  (默认为 0.0 0.0 0.0 0.0)

    emissive                 <r> <g> <b> [<a>] |             这个pass的散射光颜色
                             <vertex color>                  (默认为 0.0 0.0 0.0 0.0)

    scene_blend              <add> | <modulate>              pass对场景的混合处理
                             <alpha_blend> | <colour_blend>  默认为不透明,不混合

    scene_blend              <src_factor> <dest_factor>      场景混合功能的高级控制,参数值有
                                                             one, zero,dest_colour, src_colour,
                                                             one_minus_dest_colour,
                                                             one_minus_src_colour,
                                                             dest_alpha, src_alpha,
                                                             one_minus_dest_alpha,
                                                             one_minus_src_alpha(默认为zero)
        
    depth_check              <on> | <off>                    这个pass是否允许深度缓冲检测
                                                             (默认为on)

    depth_write              <on> | <off>                    这个pass是否允许深度缓冲写入
                                                             (默认为on)

    depth_func               <func>                          pass使用的深度缓冲检测类型,值有
                                                             always_fail, always_pass,
                                                             less, less_equal, equal,
                                                             not_equal, greater_equal,   
                                                             greater (默认为 less_equal).

    depth_bias               <offset>                        深度偏移值(默认为0)

    alpha_rejection          <func>                          是否允许alpha-reject,值与上面
                                                             depth_func类似(默认为always_pass)

    cull_hardware            <clockwise> | <anticlockwise> | 设置硬件顶点背面剔除的类型 
                             <none>                          (默认为 clockwise)                                                             

    cull_software            <back> | <front> | <none>       设置基于法线剔除的类型

    lighting                 <on> | <off>                    是否允许动态光(默认为 on)

    shading                  <flat> | <phong> | <gouraud>    设置动态光模式(默认为 gouraud)

    polygon_mode             <solid> | <wireframe> |         设置渲染状态(默认为 solid)
                             <points>
        
    fog_override             <true> | <false> [<type>        可以修改雾的设置.类型有none
                             <colour> <density>              linear,exp, exp2; colour 
                             <start> <end>                   为RGB颜色值(值在0.0到1.0)
                                                             exp, exp2的density为浮点值
                                                             start和end为linear距离值
                                                             (默认为fog_override false).

    colour_write             <on> | <off>                    是否允许颜色写入

    max_lights               <number>                        动态光的数量

    iteration                <once> | <once_per_light>       哪重光起作用once_per_light
                                                             point,directional,spot
                                                             默认为(once)

    iteration                <number> [<per_light>           指示每种光的重复数量
                                                             (默认为1)

    point_size               <size>                          点列表里点的尺寸(默认为 1)

    point_size_attenuation   <on> | <off>                    点的尺寸石灰根据视觉空间    
                             [constant linear quadratic]     进行衰减(默认为off) 

    point_size_min           <size>                          衰减后的点的最小值
                                                             (默认为0)

    point_size_max           <size>                          衰减后的点的最大值
                                                             (默认为0)

    point_sprites            <on> | <off>                    是否允许硬件point-sprite渲染


    Texture-Unit 属性 

    属性名                 值的格式                     描述 

    texture_alias            <alias>                          纹理的别名(默认为texture_unit名)

    texture                  <name> [<type>] [unlimited |     texture_unit的静态纹理名.类型为1d
                             numMipMaps] [alpha]              2d(默认),3d,cubic; numMipMaps 为
                                                              自动生成时的数量(默认为unlimited)
                                                              alpha为装载单个alpha纹理通道

    anim_texture             <base_name> <num_frames>         设置动画纹理使用的图象
                             <duration>                       根据 base_name 和 zero-based 索引
                                                              建立 num_frames 个图象.duration为
                                                              动画的长度.决定了纹理动画的FPS 
                                                              (默认为不使用纹理动画)

    anim_texture             <frame1> <frame2> ...            设置动画纹理的图象.
                             <duration>

    cubic_texture            <base_name> <combinedUVW|        设置立方图的图象, base_name为使用
                             separateUV>                      的图象名。combinedUVW使用3D地址的
                                                              硬件立方图.separateUV 使用分离的纹理
                                                              文件的后缀为_fr, _bk, _up, _dn, _lf, _rt
                            
    cubic_texture            front> <back> <up> <down>        设置立方图的纹理, separateUV  为上面说的
                             <left> <right>                   

    tex_coord_set            <index>                          设置纹理使用的纹理坐标组.(默认为0) 

    tex_address_mode         <wrap> | <clamp> | <mirror> |    设置纹理寻址方式,默认为wrap
                             <border> 

    tex_border_colour        <r> <g> <b> [<a>]                定义须寻址模式border的颜色
                                                              (默认为0.0 0.0 0.0 1.0)

    filtering                <none> <bilinear> <trilinear>    纹理过滤类型(默认为 anisotropic)

    filtering                <minification> <magnification>   高级单位纹理过滤类型.minification
                             <mip>                            或magnification可以设置为point,
                                                              linear, anisotropic. mip 的参数
                                                              为 none, point, linear

    max_anisotropy           <degree>                         anisotropy的最大度数(默认为1)
                    
    colour_op                <replace> | <add> |              纹理的混合类型(默认为 modulate)
                             <modulate> | <alpha_blend>

    colour_op_ex             <operation> <source1>            高级纹理混合类型
                             <source2> [<manual_factor>]      operation 的参数为source1, source2, 
                             [<manual_colour1>]               modulate,modulate_x2, modulate_x4, add,
                             [<manual_colour2>]               add_signed, add_smooth, subtract,
                                                              blend_diffuse_alpha,blend_texture_alpha,
                                                              blend_current_alpha,blend_manual, 
                                                              dotproduct,blend_diffuse_color;
                                                              source1 和 source2 的参数为 src_current
                                                              src_texture, src_diffuse,
                                                              src_specular, src_manual; 
                                                              manual_factor 和 manual_colour1 基于
                                                              operation, source1 和 source2的值

    colour_op_               <src_factor> <dest_factor>       当multitexturing不能使用的时候
    multipass_fallback                                        纹理混合使用的回调方法
                                                              src_factor 和 dest_factor的值
                                                              scene_blend 的类似

    alpha_op_ex              (参考 colour_op_ex.)             于colour_op_ex类似但决定的是alpha值
                                                              如何混合.

    env_map                  <off> | <spherical> |            允许这个纹理层作为环境贴图.(默认为off)
                             <planar> | cubic_reflection |    
                             cubic_normal
                    
    scroll                   <x> <y>                          让纹理scroll固定的偏移量

    scroll_anim              <x_speed> <y_speed>              设置纹理固定速度的动画scroll 

    rotate                   <angle>                          设置纹理固定的旋转(逆时针多少度)

    wave_xform               <xform_type> <wave_type>         设置纹理的变形.xform_type的参数有
                             <base> <freq> <phase>            scroll_x,croll_y, rotate, scale_x, 
                             <amplitude>                      scale_y; wave_type的参数有sine, triangle,                                                          square, sawtooth, inverse_sawtooth
    transform                <m00> <m01> . . . <m32> <m33>    给纹理应用一个4X4的变化矩阵       
    lod_index                <number>                         这个technique使用的Detail level
                                                              (默认为0)

  • 相关阅读:
    一个好用的小图标库
    前端应用笔记
    HttpClient的使用今天遇到一个巨坑——HttpEntity内容取不出来
    HttpClient忽略SSL证书
    SpringBoot+Thyemelaf开发环境正常,打包jar发到服务器就报错Template might not exist or might not be accessible
    查询Mysql数据库所有数据库所占磁盘空间大小
    Docker安装并运行mysql5.6数据库
    Docker下载镜像太慢问题
    Docker安装Nginx
    vue-router导航守卫
  • 原文地址:https://www.cnblogs.com/minggoddess/p/1907184.html
Copyright © 2011-2022 走看看