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

  • 相关阅读:
    element-ui 设置input的只读或禁用
    vue 获取后端数据打印结果undefined问题
    用yaml来编写配置文件
    [LeetCode] 28. 实现strStr()
    [LeetCode] 25. k个一组翻转链表
    [LeetCode] 26. 删除排序数组中的重复项
    [LeetCode] 24. 两两交换链表中的节点
    [LeetCode] 23. 合并K个排序链表
    [LeetCode] 21. 合并两个有序链表
    [LeetCode] 22. 括号生成
  • 原文地址:https://www.cnblogs.com/RenderLife/p/2706487.html
Copyright © 2011-2022 走看看