• 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

  • 相关阅读:
    pytest(二十四)--运行上次失败用例(--if 和 --ff)
    pytest(二十三)--conftest.py作用范围
    pytest(二十二)--fixture的作用范围(scope)
    pytest(二十一)--使用多个fixture和fixture直接互相调用
    pytest(二十)--fixture详细介绍-作为参数传入,error和failed区别
    pytest(十八)--doctest测试框架
    HDU
    Hrbust-1132 水数(排列组合)
    HDU
    UPC-5842 硬币游戏IV(DP)
  • 原文地址:https://www.cnblogs.com/RenderLife/p/2706487.html
Copyright © 2020-2023  润新知