update dx9 to dx11

refers to   CUBEMAP sampler

texCUBE(CubeMpaSampler,normal)

maybe change to

CubemapSampler.Sample(CubeMapSamplerState,???)

??? 这里需要一个 三维向量

我写normal.xyz

but the sample result seems a pyramid

http://msdn.microsoft.com/en-us/library/windows/desktop/ff476122%28v=vs.85%29.aspx

technique syntax

struct SKYMAP_VS_OUTPUT	//output structure for skymap vertex shader
{
float4 Pos : SV_POSITION;
float3 texCoord : TEXCOORD;
};

Here is our skymaps VS. As you can see, we are taking in normal values for each vertex still, this is because we are going to be using the same input layout for all our geometry (so we don't have to do more code). However, we will not be using the normals. And in fact, we did not define texture coordinates for our vertices either. This is because the texture coordinates will be defined by our vertices position. We can use our vertices position as a vector, describing the texel in our texturecube to color the pixel with. You can see how we do that with the line output.texCoord = inPos;. Also, notice when we are defining the output position, we take the values .xyww instead of .xyzw. This is because w is equal to 1.0f. We want to make sure our skymap is always the furthest object in our scene, so we want to set our z value to 1.0f too, which is what w is. Remember, 1.0f is the furthest value from the screen.

http://www.braynzarsoft.net/index.php?p=D3D11CUBEMAP

eyepositon 的semantic问题引起

texCUBE() to CubemapSampler.Sample()的更多相关文章

  1. Linux下UPnP sample分析

        一.UPnP简介   UPnP(Universal Plug and Play)技术是一种屏蔽各种数字设备的硬件和操作系统的通信协议.它是一种数字网络中间件技术,建立在TCP/IP.HTTP协 ...

  2. cocos2d-x for android配置 & 运行 Sample on Linux OS

    1.从http://www.cocos2d-x.org/download下载稳定版 比如cocos2d-x-2.2 2.解压cocos2d-x-2.2.zip,比如本文将其解压到 /opt 目录下 3 ...

  3. android studio2.2 的Find Sample Code点击没有反应

    1 . 出现的问题描述:           右键点击Find Sample Code后半天没有反应,然后提示 Samples are currently unavailable for :{**** ...

  4. jmeter(四)Sample之http请求

    启动jmeter,建立一个测试计划 这里再次说说怎么安装和启动jmeter吧,昨天下午又被人问到怎样安装和使用,我也是醉了:在我看来,百度能解决百分之八十的问题,特别是基础的问题... 安装:去官网下 ...

  5. jcaptcha sample 制作验证码

    Skip to end of metadata Created by marc antoine garrigue, last modified by Jeremy Waters on Feb 23, ...

  6. Python 对不均衡数据进行Over sample(重抽样)

    需要重采样的数据文件(Libsvm format),如heart_scale +1 1:0.708333 2:1 3:1 4:-0.320755 5:-0.105023 6:-1 7:1 8:-0.4 ...

  7. Basic linux command-with detailed sample

    Here I will list some parameters which people use very ofen, I will attach the output of the command ...

  8. 例子:RSS Reader Sample

    本例演示了Rss xml信息的获取,以及如何使用SyndicationFeed来进行符合Rss规范的xml进行解析. SyndicationFeed 解析完成后 可以得到SyndicationItem ...

  9. 例子:Background Audio Streamer Sample

    The Background Audio Streamer sample demonstrates how to create an app that uses a MediaStreamSource ...

随机推荐

  1. iOS NSDate与NSString之间的相互转换

    假如我们需要把当前的时间当成一个字符串作为一张图片的名字的话,就需要把当前的时间NSDate类型的数据转换成NSString类型. 又或者在网络请求的时候,我们在网络上的到时间是一个字符串但是在本地就 ...

  2. VxWorks 6.9 内核编程指导之读书笔记 -- POSIX

    POSIX能力 VxWorks扩展了POSIX,为了移植,VxWorks提供了额外的POSIX接口作为可选组件.VxWorks实现了POSIX 1003.1(POSIX .1)一些传统接口以及POSI ...

  3. php魔术方法 http_build_query使用

    最近在做一个项目使用到 http_build_query 这个魔术方法很好用,它可以将一个数组转换成这样的格式: 比如 $_arr = array('action'=>'show','page' ...

  4. Fragstats景观分析研究

    QQ 交流群: Fragstats景观分析 加群链接:http://url.cn/N4wZ3N

  5. mysql数据库的简单操作

    首先进入mysql:mysql -u root -p 1.建库: create database 库名称; 例如:create database mydata;(创建一个名为“mydata”的库): ...

  6. 火狐谷歌浏览器Json查看插件

    1.搜: Firefox的JSON插件 参考: Chrome/FireFox浏览器下处理JSON的插件_Bruce_新浪博客 JSONView :: Firefox 附加组件 但是后来去发现没用: 打 ...

  7. jquery的 $(function(){ }) = $(document).ready(function(){ }) ,及页面的加载顺序

    document.ready和onload的区别:一.JavaScript文档加载完成事件页面加载完成有两种事件一是ready,表示文档结构已经加载完成(不包含图片等非文字媒体文件) 二.是onloa ...

  8. javascript Date 函数的坑

    Javascrip中对日期的解析.格式化简直是混乱不堪,各种的坑,攻城狮们多小心.   1. 不要用 Date("yyyy-mm-dd") 构造函数解析字符串. IE.firefo ...

  9. 正则PerlRegEx实现的批量替换指定文件中的标签

    示例: 一个朋友需要而编写的标签升级更新. 速度超快,1w个文件大概4,5秒,本想加个多线程显示进度,后来想想算了 主要代码: reg.RegEx := '<' + Edit_regular1. ...

  10. Oracle varchar2 4000

    关于oracle varchar2 官方文档的描述 VARCHAR2 Data Type The VARCHAR2 data type specifies a variable-length char ...