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

  • 相关阅读:
    保持同步
    将Cent0S 7的网卡名称eno16777736改为eth0
    Linux系统各发行版镜像下载(2)
    Linux系统各发行版镜像下载
    ~/.ssh目录找不到解决方法
    克隆后虚拟机网络配置
    新建的linux虚拟机找不到eth0解决办法
    SecureCRT 7 注册码
    linux运维常用命令
    shell脚本实例(2)
  • 原文地址:https://www.cnblogs.com/RenderLife/p/2706487.html
Copyright © 2011-2022 走看看