zoukankan      html  css  js  c++  java
  • dx小记(1)

    资源视图(VIEW)主要有两个功能 :1)告诉 Direct3D 如何使用资源  (即,指定资源所要绑的管线阶段  ); 2)如果在创 建资源时指定的是弱类型  (typeless )格式 ,那么在为它创建资源视图时就必须指定明确的类型  。对于弱类  ,纹理元素可能会在一个管线阶段中视为浮点数 而在另一个管线阶段中视为整数 

    当创建资源时 , 为资源指定强 类型 ( fullyfully-typed)格式 , 把资源的用途 限制在格式规定的范围内 ,有利于提高运行时环境对资源的访问速度 ……”

    所以 ,你只应该在真正需要弱类型资 ,才创建弱类型资源  ;否则 ,应尽量创建强类型资源 应尽量创建强类型资源 

    The equation for specular lighting is the following:

    	SpecularLighting = SpecularColor * (SpecularColorOfLight * ((NormalVector dot HalfWayVector) power SpecularReflectionPower) * Attentuation * Spotlight)
    

    We will modify the equation to produce just the basic specular lighting effect as follows:

    	SpecularLighting = SpecularLightColor * (ViewingDirection dot ReflectionVector) power SpecularReflectionPower
    

    The reflection vector in this equation has to be produced by multiplying double the light intensity by the vertex normal. The direction of the light is subtracted which then gives the reflection vector between the light source and the viewing angle:

    	ReflectionVector = 2 * LightIntensity * VertexNormal - LightDirection
    

    The viewing direction in the equation is produced by subtracting the location of the camera by the position of the vertex:

    	ViewingDirection = CameraPosition - VertexPosition

  • 相关阅读:
    IBoutlet 学习笔记
    Stirng str1 = new String("abc");Stirng str2 = new String("abc");创建了几个对象
    readonly strong nonatomic 和IBOutlet
    MAC技巧,让mac和windows之间识别硬盘
    Eclipse Retina 视网膜屏 设置
    PList
    三种方法更改MAC OS X下的HOSTS文件
    第一个Dart程序HelloDart
    第三个Dart程序扩展(访问lib文件里的成员变量)
    初识Dart
  • 原文地址:https://www.cnblogs.com/RenderLife/p/2706487.html
Copyright © 2011-2022 走看看