云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > molehill介绍翻译

molehill介绍翻译

  • 62 次阅读
  • 3 次下载
  • 2025/5/24 21:19:23

Context3DVertexBufferFormat.FLOAT_2 );

Our vertices position and uv values are defined into our VertexBuffer3D object : 01.vertexBuffer.uploadFromVector( 02.Vector.( 03.[

04.// x,y,u,v 05.-1,-1, 0,1, 06.0,1, 1,0, 07.1,-1, 1,1, 08.] 09.), 10.0, 3 11.);

Then we retrieve the uv values in our fragment shader and sample our texture :

1.fragmentShaderAssembler.assemble( Context3DProgramType.FRAGMENT, 2.\

3.\ 4.\ 5.);

To define our texture, we instantiate our BitmapData, upload it to a Texture object and upload it to the GPU: 1.texture

=

context3D.createTexture( 256, 256,

Context3DTextureFormat.BGRA, false );

2.var bitmap:Bitmap = new MolePeopleBitmap();

3.texture.uploadFromBitmapData( bitmap.bitmapData ); And then to access it from fs1, we set it:

1.context3D.setTextureAt( 1, texture ); By using this modified shader program, we end up with this :

I will cover in later tutorials new effects like per-fragment fog or heat signature with texture lookup too. Of course, we just covered here how shaders work with Molehill. To control your pixels you need triangles and vertices and indices defining them in your scene. For this, you will need other objects like VertexBuffer3D and IndexBuffer3D, attached to your Context3D object. The following figure illustrates the overall interaction of objects:

As you can see, the Molehill APIs are very low-level and expose features for advanced 3D developers who want to work at such a level with 3D. Of course, some developers will prefer working with higher-level frameworks, which exposes ready to go APIs, and we took care of that. Building mountains out of Molehill

We know that many ActionScript 3 developers would prefer having a light, a camera, a plane to work with rather than a vertex buffer and shadersbytecode. So to make sure that everyone can enjoy the power of Molehill, we are actively working with existing 3D frameworks like Alternativa3D, Flare3D, Away3D, Minko, Sophie3D, Yogurt3D and more. Today most of these frameworks are already Molehill enabled and will be available for you when Molehill is available in a next version of the Adobe Flash runtimes.

Most of the developers from these frameworks were at Max this year to present sessions about how they leveraged Molehill in their respective framework. We expect developers to build their engine on top of Molehill, hence, advanced 3D developers and non-3D developers will be able to benefit from Molehill. I hope you enjoyed this little deep dive into Molehill, stay tuned for more Molehill stuff soon

Post a comment | Trackback URI

搜索更多关于: molehill介绍翻译 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

Context3DVertexBufferFormat.FLOAT_2 ); Our vertices position and uv values are defined into our VertexBuffer3D object : 01.vertexBuffer.uploadFromVector( 02.Vector.( 03.[ 04.// x,y,u,v 05.-1,-1, 0,1, 06.0,1, 1,0, 07.1,-1, 1,1, 08.] 09.), 10.0, 3 11.); Then we retrieve the uv values in our fragment shader and sample our texture : 1.fragmentShaderAssembler.asse

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com