• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            4D星宇

            c++

              C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
              57 隨筆 :: 0 文章 :: 39 評論 :: 0 Trackbacks

            #

            有Effect版:
                DWORD         g_dwShaderFlags; // Shader compilate and link flags
                  LPD3DXBUFFER  g_pCompiledFragments = NULL; 

                D3DXGatherFragmentsFromFile( L"FragmentLinker.fx", NULL,
                            NULL, g_dwShaderFlags, &g_pCompiledFragments, NULL );

            D3DXGatherFragmentsFromFile requires the .fx file, pointers to the #define and #include handlers (both set to NULL in this example), and the shader compile flags. The method returns a buffer which contains the compiled shader fragment. The method can return a second buffer with compile errors, which is set to NULL in this example because it is not used. D3DXGatherFragments is overloaded to handle loading fragments from a string, a file, or a resource.

            Set your debugger to break on this method to look for compile errors in the debugger. The compiler can catch errors in syntax, but it cannot check for registers that are shared incorrectly due to the fact that it has no way to predict which parameters a user may want to share between fragments.

            You need a fragment linker to manage the compiled fragments. Create the fragment linker by calling D3DXCreateFragmentLinker:

            ID3DXFragmentLinker* g_pFragmentLinker = NULL;     // Fragment linker interface
            IDirect3DDevice9*    pd3dDevice        = NULL;

                // Initialize the device before using it
             ...
             
                // Create the fragment linker interface
                D3DXCreateFragmentLinker( pd3dDevice, 0, &g_pFragmentLinker );

            Then simply add the compiled fragments to the fragment linker using ID3DXFragmentLinker::AddFragments.

                // Add the compiled fragments to a list
                g_pFragmentLinker->AddFragments(    
                          (DWORD*)g_pCompiledFragments->GetBufferPointer() );

            ID3DXFragmentLinker::AddFragments requires a pointer to the DWORD stream that contains the compiled shader.

            After compiling fragments and creating a fragment linker, there are several ways to link fragments. One way to link a vertex shader fragment is to call ID3DXFragmentLinker::LinkVertexShader. Here is an example that links two vertex shader fragments:

                // Get a handle to each fragment   
                D3DXHANDLE fragmentHandle[2];
             fragmentHandle[0] =
                 (D3DXHANDLE)g_pFragmentLinker->GetFragmentHandleByName("Ambient");
             fragmentHandle[1] =
                 (D3DXHANDLE)g_pFragmentLinker->GetFragmentHandleByName("AmbientDiffuseFragment");
               
                // Link the fragments together to form a vertex shader
                IDirect3DVertexShader9* pVertexShader = NULL;
                g_pFragmentLinker->LinkVertexShader( "vs_1_1", g_dwShaderFlags,
                       fragmentHandle, 2, &pVertexShader, NULL );

            This requires a shader compile target, the shader compile and link flags, and a handle to each of the fragments to link. If the fragments are successfully linked, ID3DXFragmentLinker::LinkVertexShader returns a vertex shader (IDirect3DVertexShader9). The vertex shader needs to be set in the effect before rendering. But before this, here's how the shader is declared in the effect:

            VertexShader MyVertexShader; // Vertex shader set by the application

            The effect technique contains all the state set for a pass. This pass specifies the vertex shader like this:

            technique RenderScene
            {
                pass P0
                {
                    VertexShader = <MyVertexShader>;   
                    PixelShader = compile ps_1_1 ModulateTexture();   
                }

            With the effect's vertex shader created and initialized, the render code also sets the uniform constants and calls the render loop. Set the uniform constants similar to this:

                // Update the uniform shader constants.
                g_pEffect->SetMatrix( "g_mWorldViewProjection", &mWorldViewProjection );
                g_pEffect->SetMatrix( "g_mWorld", &mWorld );
                g_pEffect->SetFloat( "g_fTime", (float)fTime );   
            Then render the effect by setting the current technique and pass:

                // Render the scene
                if( SUCCEEDED( pd3dDevice->BeginScene() ) )
                { 
                    // Apply the technique contained in the effect
                    UINT cPasses, iPass;
                    g_pEffect->Begin(&cPasses, 0);

                    for (iPass = 0; iPass < cPasses; iPass++)
                    {
                        g_pEffect->BeginPass(iPass);

                        // Render the mesh with the applied technique
                        g_pMesh->DrawSubset(0);

                        g_pEffect->EndPass();
                    }
                    g_pEffect->End();

                    pd3dDevice->EndScene();
                }

            When setting uniform shader constants, it is more efficient to cache a handle to the parameter by calling ID3DXBaseEffect::GetParameterByName. This avoids the string lookup that is necessary when calling effect methods like ID3DXBaseEffect::SetMatrix.

              // Instead of setting a uniform constant like this in the render loop
              g_pEffect->SetMatrix( "g_mWorldViewProjection", &mWorldViewProjection );

              // Get a handle to a uniform constant outside of the render loop
              D3DXHANDLE hParameter;
              GetParameterByName( hParameter,"g_mWorldViewProjection");

              ...
             
              // Use the handle to set the uniform constant in the render loop
              g_pEffect->SetMatrix(hParameter);

            無Effect版:
             LPD3DXCONSTANTTABLE pConstantTable;
                LPD3DXBUFFER pShaderBuf;
                IDirect3DVertexShader9* pVertexShader = NULL;

                // Compile the fragments to a buffer.
                D3DXGatherFragmentsFromFile( L"FragmentLinker.fx", NULL, NULL,
                     g_dwShaderFlags, &g_pCompiledFragments, NULL );
               
                g_pFragmentLinker->AddFragments((DWORD*)g_pCompiledFragments->GetBufferPointer());
                g_pFragmentLinker->LinkShader(
                 "vs_1_1",
                 g_dwShaderFlags,
                 aHandles,
                 NUM_FRAGMENTS,
                 &pShaderBuf,
                 NULL);
                D3DXGetShaderConstantTable(
                 (DWORD*)pShaderBuf->GetBufferPointer(),
                 &pConstantTable );
               
                pDevice->CreateVertexShader(
                 (DWORD*)pShaderBuf->GetBufferPointer(),
                 &pVertexShader);
                RELEASE(pShaderBuf);

            posted @ 2008-05-12 19:51 bloodbao 閱讀(461) | 評論 (0)編輯 收藏

            OGRE場景管理:
            PCZSceneManager : public SceneManager
            節(jié)點(diǎn):
                typedef std::list < SceneNode * > NodeList;
                typedef std::list < WireBoundingBox * > BoxList;
            攝像機(jī):
                class PCZCamera;
            天空:
                void setSkyZone(PCZone * zone);
            光照:
                createLight(const String& name);
            地帶:
                class PCZone;
                PCZone * createZone(const String& zoneType, const String& instanceName);
            釋放節(jié)點(diǎn):
                void removeSceneNode( SceneNode * );
            節(jié)點(diǎn)查找:
                void findNodesIn( const AxisAlignedBox &box,
                    PCZSceneNodeList &list,
                    PCZone * startZone,
                    PCZSceneNode *exclude = 0 );

                class PCZIntersectionSceneQuery;-----相交查詢
                class PCZRaySceneQuery;---------射線查詢
                class PCZSphereSceneQuery;--------球面查詢
                class PCZAxisAlignedBoxSceneQuery;------箱查詢(沿軸向)
                class PCZPlaneBoundedVolumeListSceneQuery;-------表查詢
            簡單地看了OGRE的場景管理,除了OGREMAIN部分,還用了PCZ插件來實(shí)繼承并實(shí)現(xiàn)。
            (class PCZSceneManagerFactory : public SceneManagerFactory)挺復(fù)雜的,相比之下,鬼火的場景管理就簡單了,
            可調(diào)用多種節(jié)點(diǎn)。

            posted @ 2008-05-11 11:42 bloodbao 閱讀(1487) | 評論 (0)編輯 收藏

            posted @ 2008-05-10 22:00 bloodbao 閱讀(189) | 評論 (1)編輯 收藏

            175.5K MilkShape_3D_v1.8.2.zip
             
            已經(jīng)成功地保存在Mofile
            文件提取碼: 4330054774071826
             
                當(dāng)您的朋友需要提取此文件時(shí)只需:
                 匿名提取文件連接 http://pickup.mofile.com/4330054774071826
                 或登錄Mofile,使用提取碼 4330054774071826 提取文件
            呼呼,,高興啊,剛收到朋友發(fā)來的UNREAL3的源碼!可以好好的研究一下啦,找不到工作,我就做自已的游戲,自已的引擎!
            posted @ 2008-05-08 19:35 bloodbao 閱讀(481) | 評論 (0)編輯 收藏

            這一次的應(yīng)聘是徹底失敗了,不過,也算是見識(shí)了福建的網(wǎng)游公司。
            一天坐了九個(gè)小時(shí)的車,我算是體驗(yàn)到了討生活的艱辛。
            中午坐車的時(shí)候天還是炎熱的,下午開始狂下雨,我穿著兩件衣服還一直在發(fā)抖。
            先來談?wù)劯惺埽?br>1.公司內(nèi)部環(huán)境不錯(cuò),很漂亮的游泳池,攀沿壁,會(huì)議室,食堂。我比較喜歡那個(gè)游泳池,感覺很不錯(cuò)。
            2.美女很多,特別是人事部門的,那么冷的天氣,穿著超短裙,簡是要風(fēng)度不要溫度。不過,特別養(yǎng)眼。
            3.工作環(huán)境,兩三百個(gè)人擠在一個(gè)大廳中。好像,各個(gè)開發(fā)組都在一起吧,有些成員面前放著兩臺(tái)很大的液晶,很上去就挺爽的。只是這么吵雜的環(huán)境適合開發(fā)嗎,偶是不知道的。
            4.人事部的MM挺勤快的,不過,依舊有被扔在一旁的感覺,特別是在等與主程見面的時(shí)間,差不多快一個(gè)小時(shí)。幸好旁邊的一個(gè)帥哥給了本雜志,讓我打發(fā)時(shí)間。
            5.每時(shí)每刻都有人在應(yīng)聘,不過,都是招文員。感覺就去了一個(gè)PHP的,也算技術(shù)的。
            6.主程很厲害,用現(xiàn)在的話講,叫很牛。人事的MM,說他很嚴(yán)格,面試的題目都是他出的,非常難。面談時(shí)果然很嚴(yán),偶不是計(jì)算機(jī)科班出身的,雖然C++用的不是爐火純青,但也有兩三年的基礎(chǔ),對基本概念都是小懂的,可是要我按書本上背出來,讓我有點(diǎn)難以接受(也背不出來啊)。
            至于題目的難度,有用的C++的朋友,應(yīng)該都是了解的。還有就是那個(gè)主程一直想讓我講優(yōu)點(diǎn)和缺點(diǎn),估計(jì)是出于崗位安排考慮,可是俺一直找不來自已的特色,這算是我面試的敗筆吧。最大的敗筆可能是對人事的MM,說了句這考題太EASY了。
            7.帶去代碼用的調(diào)試環(huán)境太高,這是我的錯(cuò)!哎,誰讓我的開發(fā)環(huán)境是VISTA+VC2008!嗯,難道ND都沒有一臺(tái)電腦跑這個(gè)的?
            那主程說程序打不開。哎,我的錯(cuò)。直覺告訴我,這個(gè)主程比華為面試官差多了,簡直是兩個(gè)檔次的。以前,在和華為的交流時(shí),那態(tài)度啊,對代碼的分析,都很不錯(cuò)。可憐,那時(shí)我剛學(xué)C++,傻乎乎的就跑去面試,華為招硬件+C的比較多,和偶的不適合(我不懂?dāng)?shù)字電路,模電等硬件方面的知識(shí))。
            8.我說了我的優(yōu)勢在對數(shù)學(xué)的了解上,比如矩陣可能在引擎上有一定的應(yīng)用。那主程直接和我說,數(shù)學(xué)在游戲開發(fā)上應(yīng)用不太。我忽視了,ND好像用的是UNREAL,別人的引擎,不用自已開發(fā)底層吧?
            C++
            1.什么是繼承?
            2.什么是多態(tài)性?
            3.什么是Iterator,有什么作用?
            4.STL是什么?
            5.STACK,LIST和MAP有什么不同?
            6.什么是重載(overloading)和重寫(overridding)?有什么區(qū)別?
            7.多線程有幾種。。。?
            8.MUTEX和CRITICALSECTION有什么區(qū)別?
            9.ENTERCRITICALSECTION和TRYENTERCRITICALSECTION有什么不同?
            D3D
            1.材質(zhì)是什么?有些什么元素?
            2.LOD時(shí)產(chǎn)生T型裂縫和呼吸效應(yīng),有什么優(yōu)化方案?
            3.淺解HDR技術(shù)?
            4.什么是BILLBOARD,怎么實(shí)現(xiàn)?
            5.什么是BSP?用在室內(nèi)還是室外?怎么實(shí)現(xiàn)?
            6.模板緩沖區(qū)的應(yīng)用?
            7.逆矩陣有什么應(yīng)用?
            面試時(shí):
            1.D3D或ONPENGL,實(shí)現(xiàn)一個(gè)三角形?(過程)
            2.用過什么物理引擎?
            3.用過什么腳本?
            4.自已的優(yōu)缺點(diǎn)?
            5.有什么作品并介紹?
            6.對3D中的什么最熟悉?
            總結(jié):敗軍之將,談什么都是沒用的,找不到好工作苦的是自已,趕快加深自身的修養(yǎng)。特別是表達(dá)和溝通能力。
            posted @ 2008-05-08 14:38 bloodbao 閱讀(858) | 評論 (8)編輯 收藏

            該項(xiàng)目使用INI來實(shí)現(xiàn)數(shù)據(jù)的讀取。
            比如:
            1.節(jié)點(diǎn)讀取
            INI部分:
            外觀
            Look
             Body
              model=impreza.3ds
              scale=1 1 1
             Wheels
              model=wheel.3ds
              scale=1 1 1
            聲音
            Sound
             Engine
              wave=206_engine.wav
              pitch_low=0.2
              pitch_high=1.5
            程序部分:
            //load car

             body.node=loadModel(cfg, "Look/Body/", device, sm, driver);

             body.node_debug=sm->addCubeSceneNode(1, 0, -1, core::vector3df(0, 0, 0), core::vector3df(0, 0, 0),
              cfg.Getval_vector("Body/Chassis/1/scale", core::vector3df(1, 1, 1))
              );
             body.node_debug->setMaterialTexture(0, driver->getTexture("data/misc/checked.jpg"));
            2.車輪的屬性
             Wheel #default
              damp=30000
              spring=50000
              radius=0.38
              weight=20
              width=0.10 #not yet used if user specifies wheel model
              brakes=0 # 0.0 - 1.0
             Wheel_1 #fl
              pos=1.39 -0.145 0.823
              attr=STEER
              brakes=0.8
              rotation_z=1.5707963 #used just by client part
             Wheel_2 #fr
              pos=1.39 -0.145 -0.823
              attr=STEER
              brakes=0.8
              rotation_z=4.7123889
             Wheel_3 #rl
              pos=-1.350 -0.15 0.823
              attr=STRAIGHT|THURST
              brakes=0.2
              rotation_z=1.5707963
             Wheel_4 #rr
              pos=-1.350 -0.15 -0.823
              attr=STRAIGHT|THURST
              brakes=0.2
              rotation_z=4.7123889
            for (int i=0; ; i++) {
              char buf2[128];

              sprintf(buf2, "Body/Wheel_%d/", i+1);
              buf=buf2;

              if (!cfg.Getval_exists(buf+"attr")) break;

              double radius=cfg.Getval_double((string)buf+"radius", cfg.Getval_double("Body/Wheel/radius", 1));
              double width=cfg.Getval_double((string)buf+"width", cfg.Getval_double("Body/Wheel/width", 1));

              scene::ISceneNode* node=loadModel(cfg, "Look/Wheels/", device, sm, driver);
              CModelAttr wm;

              scene::IMesh* cm=CreateCylinder(25, 2, 1);
              scene::ISceneNode* node_debug=sm->addMeshSceneNode(cm);
              node_debug->setScale(core::vector3df((f32)(radius), (f32)width, (f32)(radius)));
              node_debug->setMaterialTexture(0, driver->getTexture("data/misc/checked.jpg"));
              node_debug->getMaterial(0).EmissiveColor.set(255,255,255,255);

              wm.arot=core::vector3df((f32)cfg.Getval_double(buf+"rotation_x", 0),
                (f32)cfg.Getval_double(buf+"rotation_y", 0),
                (f32)cfg.Getval_double(buf+"rotation_z", 0));
              wm.node=node;
              wm.node_debug=node_debug;

              wheels.push_back(wm);
             }
            3.聲音---車開動(dòng)時(shí)的轟鳴聲
             //load sounds
             try {
              snd_engine = new openalpp::Source((ALbyte*)("data/cars/"+profile+"/"+cfg.Getval_str("Sound/Engine/wave")).c_str());
              if (!snd_engine.valid())
               DBGCOUT("ALUT", "Coulnd't load file", ("data/cars/"+profile+"/"+cfg.Getval_str("Sound/Engine/wave")).c_str());
              else {
               snd_engine->setGain(1);
               snd_engine->setPosition(0.0,0.0,0.0);
               snd_engine->setLooping(true);
              }
              snd_engine_pitch_low=cfg.Getval_double("Sound/Engine/pitch_low");
              snd_engine_pitch_high=cfg.Getval_double("Sound/Engine/pitch_high");
             } catch(openalpp::Error e) {
              std::cerr << e << "\n";
             }

            posted @ 2008-05-08 10:31 bloodbao 閱讀(202) | 評論 (0)編輯 收藏

            ODE常用變量:
            dWorldID world;
            dSpaceID space;
            dJointGroupID  contactgroup;
            dBodyID body;
            dGeomID geom;
            初始化:
            void InitODE(){
             dInitODE();
             world=dWorldCreate();
             space=dHashSpaceCreate(0);
             contactgroup=dJointGroupCreate(0);
             dWorldSetGravity(world,0,-9.8,0);
            }
            回調(diào)函數(shù):計(jì)算碰撞點(diǎn)
            void nearCallback(void* node, dGeomID o1, dGeomID o2)
            {
              int i=0;
              dBodyID b1=dGeomGetBody(o1);
              dBodyID b2=dGeomGetBody(o2);
              const int MAX_CONTACTS = 8;
              if(b1 && b2 && dAreConnectedExcluding(b1,b2,dJointTypeContact))return;
              dContact contact[MAX_CONTACTS];
                for(i=0;i<MAX_CONTACTS;++i)
              {
                contact[i].surface.mode=dContactBounce | dContactSoftCFM;
                contact[i].surface.mu=100000.0;
                contact[i].surface.mu2=.00001;
                contact[i].surface.bounce=.2;
                contact[i].surface.bounce_vel=.1;
                contact[i].surface.soft_cfm=.0000001;
              }
                int numc=dCollide(o1,o2,MAX_CONTACTS,&contact[0].geom,sizeof(dContact));
              if(numc>0)
              {
                for(i=0;i<numc;i++)
                {
                  dJointID c=dJointCreateContact(world,contactgroup,&contact[i]);
                  dJointAttach(c,b1,b2);
                }
              }
            }
            程序主循環(huán)
            while(device->run())
             {
              setPosition(geom);
              dJointGroupEmpty (contactgroup);    //清空碰撞點(diǎn)組
              driver->beginScene(true, true, SColor(0,200,200,200));
              dSpaceCollide (space,0,&nearCallback); //通過回調(diào)函數(shù)計(jì)算碰撞點(diǎn)等數(shù)據(jù)
              dWorldQuickStep(world,0.025); //使物理世界隨著時(shí)間變化
              smgr->drawAll();
              guienv->drawAll();

              driver->endScene();
             }

            posted @ 2008-05-08 10:27 bloodbao 閱讀(546) | 評論 (4)編輯 收藏


            概要:雨粒子每刻的動(dòng)畫使用輸出流,在每一幀都使用geometry Shader擴(kuò)成billboard.
            最后,雨粒子的渲染使用的紋理庫存儲(chǔ)在一個(gè)紋理陣列。使用DX10和GeForce8 系列GPU。
            1.應(yīng)用風(fēng)和重力使粒子一直在作動(dòng)畫。
            2.把粒子擴(kuò)成要在每一幀渲染的精靈。
            3.渲染精靈
            1.(1)C++使用輸出流
            //設(shè)立渲染點(diǎn)列表,每個(gè)粒子存一個(gè)頂點(diǎn)。
            pd3dDevice->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_POINTLIST);
            pd3dDevice->IASetInputLayout(g_pVertexLayoutRainVertex);
            //決定哪個(gè)頂點(diǎn)緩沖我們既將要渲染
            假如這是第一幀我們渲染一個(gè)預(yù)產(chǎn)生的頂點(diǎn)幀g_pParticleStart
             static bool firstFrame=true;
             ID3D10Buffer* pBuffers[1];
             if(firstFrame)
              pBuffers[0]=g_pParticleStart;
             else
              pBuffers[0]=g_pParticleDrawFrom;
             pDevice->IASetVertexBuffers(0,1,pBuffers,stride,offset);
             //指向正確的輸出緩沖
             pBuffers[0] = g_pParticleStreamTo;
                    pd3dDevice->SOSetTargets( 1, pBuffers, offset );
                   
                    // 畫圖,使粒子動(dòng)畫
                    D3D10_TECHNIQUE_DESC techDesc;
                    g_pTechniqueAdvanceRain->GetDesc( &techDesc );
                    g_pTechniqueAdvanceRain->GetPassByIndex(0)->Apply(0);

                    pd3dDevice->Draw(g_numRainVertices , 0 );

                    // Get back to normal
                    pBuffers[0] = NULL;
                    pd3dDevice->SOSetTargets( 1, pBuffers, offset );

                    // Swap buffers交換緩沖區(qū)
                    ID3D10Buffer* pTemp = g_pParticleDrawFrom;
                    g_pParticleDrawFrom = g_pParticleStreamTo;
                    g_pParticleStreamTo = pTemp;
               
                    firstFrame = false;
            2.(2)HLSL--使用Geometry shader Expanding

            GeometryShader gsStreamOut = ConstructGSWithSO( CompileShader( vs_4_0, VSAdvanceRain() ), "POSITION.xyz; SEED.xyz; SPEED.xyz; RAND.x; TYPE.x" ); 
            technique10 AdvanceParticles
            {
                pass p0
                {
                    SetVertexShader( CompileShader( vs_4_0, VSAdvanceRain() ) );
                    SetGeometryShader( gsStreamOut );
                    SetPixelShader( NULL );
                   
                    SetDepthStencilState( DisableDepth, 0 );
                } 
            }
            (3)HLSL--使用Geometry shader Extruding
            // GS for rendering rain as point sprites.  Takes a point and turns it into 2 tris.
            [maxvertexcount(4)]
            void GSRenderRain(point VSParticleIn input[1], inout TriangleStream<PSSceneIn> SpriteStream)
            {
                float totalIntensity = g_PointLightIntensity*g_ResponsePointLight + dirLightIntensity*g_ResponseDirLight;
                if(!cullSprite(input[0].pos,2*g_SpriteSize) && totalIntensity > 0)
                {   
                    PSSceneIn output = (PSSceneIn)0;
                    output.type = input[0].Type;
                    output.random = input[0].random;
                  
                    float3 pos[4];
                    GenRainSpriteVertices(input[0].pos.xyz, input[0].speed.xyz/g_FrameRate + g_TotalVel, g_eyePos, pos);
                   
                    float3 closestPointLight = g_PointLightPos;
                    float closestDistance = length(g_PointLightPos - pos[0]);
                    if( length(g_PointLightPos2 - pos[0]) < closestDistance )
                       closestPointLight = g_PointLightPos2;
                   
                    output.pos = mul( float4(pos[0],1.0), g_mWorldViewProj );
                    output.lightDir = g_lightPos - pos[0];
                    output.pointLightDir = closestPointLight - pos[0];
                    output.eyeVec = g_eyePos - pos[0];
                    output.tex = g_texcoords[0];
                    SpriteStream.Append(output);
                           
                    output.pos = mul( float4(pos[1],1.0), g_mWorldViewProj );
                    output.lightDir = g_lightPos - pos[1];
                    output.pointLightDir = closestPointLight - pos[1];
                    output.eyeVec = g_eyePos - pos[1];
                    output.tex = g_texcoords[1];
                    SpriteStream.Append(output);
                   
                    output.pos = mul( float4(pos[2],1.0), g_mWorldViewProj );
                    output.lightDir = g_lightPos - pos[2];
                    output.pointLightDir = closestPointLight - pos[2];
                    output.eyeVec = g_eyePos - pos[2];
                    output.tex = g_texcoords[2];
                    SpriteStream.Append(output);
                           
                    output.pos = mul( float4(pos[3],1.0), g_mWorldViewProj );
                    output.lightDir = g_lightPos - pos[3];
                    output.pointLightDir = closestPointLight - pos[3];
                    output.eyeVec = g_eyePos - pos[3];
                    output.tex = g_texcoords[3];
                    SpriteStream.Append(output);
                   
                    SpriteStream.RestartStrip();
                }  
            }

            3.
            渲染點(diǎn)精靈
            使用DX10新特性Texture Array
            渲染霧
            運(yùn)行范例:
            范例顯示兩個(gè)點(diǎn)光源和一條直射光下的橋。
            左鍵控制直射光。

            posted @ 2008-05-08 10:25 bloodbao 閱讀(407) | 評論 (0)編輯 收藏

            posted @ 2008-05-06 21:28 bloodbao 閱讀(197) | 評論 (0)編輯 收藏

            哎,,被雨淋得死,全身都在發(fā)抖,明顯不在狀態(tài),結(jié)果是回去等通知。 估計(jì)是沒戲了,再過兩三天把面試過程總結(jié)出來。 無語中。。。。。。。。。。。。。
            posted @ 2008-05-06 21:02 bloodbao 閱讀(122) | 評論 (0)編輯 收藏

            僅列出標(biāo)題
            共6頁: 1 2 3 4 5 6 
            99久久精品国产一区二区三区| 久久人与动人物a级毛片| 91久久精品国产91性色也| 青青青青久久精品国产h久久精品五福影院1421| 99久久99久久精品国产片| 久久国产欧美日韩精品免费| 久久发布国产伦子伦精品 | 亚洲精品NV久久久久久久久久| 欧美日韩精品久久久久| 88久久精品无码一区二区毛片 | 亚洲AV无码久久寂寞少妇| 久久九九亚洲精品| 久久精品国产99国产精品导航 | 日本一区精品久久久久影院| 久久亚洲国产最新网站| 精品久久久久久99人妻| 欧美熟妇另类久久久久久不卡| 欧美性大战久久久久久| 久久99国产精品二区不卡| 一本一道久久综合狠狠老| 思思久久99热免费精品6| 亚洲成色999久久网站| 99久久国产热无码精品免费 | 97久久精品人人澡人人爽| 久久精品国产亚洲av麻豆小说 | 久久丫精品国产亚洲av不卡| 久久久久久久久66精品片| 久久婷婷五月综合色99啪ak| 久久天堂电影网| 欧美亚洲另类久久综合| a级成人毛片久久| 亚洲一区中文字幕久久| 久久综合九色综合欧美狠狠| 久久精品视频网| 国产高清美女一级a毛片久久w| 久久久精品免费国产四虎| 久久无码av三级| 久久精品视屏| 伊人久久大香线蕉精品不卡| 久久久噜噜噜久久中文字幕色伊伊| 一本色道久久88综合日韩精品 |