flagflag  If you want to see English page, please click "English" Button at Left.
1: 2014-06-21 (土) 21:17:55 iseki ソース 現: 2014-10-02 (木) 09:04:17 iseki ソース
Line 1: Line 1:
** OpenSim ジオラマ 開発用 [#w8cfb9a8] ** OpenSim ジオラマ 開発用 [#w8cfb9a8]
 + AddDynamicTextureURL()
 + RenderPlugins[contentType].AsyncConvert​Url(updater.UpdaterID, url, extraParams);
 +   contentType を持つモジュールの AsyncConvertUrl() を呼び出す.
 +#br
 +*** RenderTerrainScale [#o1907c41]
 +- void LLDrawPoolTerrain::renderFullShader() の sDetailScale
 +- デフォルトは 7, テクスチャは (リージョンサイズ/7) 個繰り返し表示される.1/7 = 0.14285714
 +- UVMap は (リージョンサイズ/7) 倍される.
 +- 256にすれば,1枚の画像.
 +#br
 +*** Terrain Texture [#ta44cfc7]
 +- llviewerregion.cpp
 +-- void LLViewerRegion::unpackRegionHandshake()
 +--- Texture のUUID をセット
-    // +- Render 
-    // detail texture 1 +-- pipeline.cpp  LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) 
-    // +--- p->reander(i
-// S32 detail1 = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL1); +---- lldrawpoolterrain.cpp  LLDrawPoolTerrain::render(S32 pass)
-// gGL.getTexUnit(detail1)->bind(detail_texture1p);+
-    /// ALPHA TEXTURE COORDS 0: 
- // gGL.getTexUnit(1)->activate(); 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
-    // detail texture 2 +                                                llviewerlayer.cpp 
-    // +                                                        ↓ 
- // S32 detail2 = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_DETAIL2); + llseurfacepatch.cpp → llvicomposition.cpp  →  llvierwerrecion.cpp 
- ;// gGL.getTexUnit(detail2)->bind(detail_tex​ture2p);+                                    ↓                ↓ 
 +                                    →          lldrawpoolterrain.cpp 
 + 
- // gGL.getTexUnit(2)->activate();+#br
-    /// ALPHA TEXTURE COORDS 1: +*** Tecture Functions [#zd2d2e9c] 
- // gGL.matrixMode(LLRender::MM_TEXTURE); +- lldrawpoolterrain.cpp 
- // gGL.loadIdentity()+ void LLDrawPoolTerrain::renderFullShaderX() 
- // gGL.translatef(-2.f, 0.f, 0.f); + { 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); +    // Hack! Get the region that this draw pool is rendering from! 
- +   LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion(); 
-  // +    LLVLComposition *compp = regionp->getComposition();
-    // detail texture 3+
    //     //
- // S32 detail3 = sShader->enableTexture(LLViewerShaderMgr::TERRAIN​_DETAIL3); +   LLViewerTexture *detail_texture0p = compp->mDetailTextures[4]
- // gGL.getTexUnit(detail3)->bind(detail_texture3p)+  
- +    // 
-    /// ALPHA TEXTURE COORDS 2: +   sDetailScale = 0.142857/36.; 
- // gGL.getTexUnit(3)->activate(); +  
- // gGL.matrixMode(LLRender::MM_TEXTURE)+    LLVector4 tp0, tp1
- // gGL.loadIdentity()+     
- // gGL.translatef(-1.f, 0.f, 0.f); +    tp0.setVec(sDetailScale, 0.0f, 0.0f, 0.0); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); ​+    tp1.setVec(0.0f, sDetailScale, 0.0f, 0.0); 
- + 
-  // +
-   // Alpha Ramp+
    //     //
-    //S32 alpha_ramp = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_ALPHARAMP); +    // detail texture 0 
-    //gGL.getTexUnit(alpha_ramp)->bind(m2DAlphaRampImagep); +    // 
 +    S32 detail0 = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_DETAIL0); 
 +    gGL.getTexUnit(detail0)->bind(detail_texture0p); 
 +    gGL.getTexUnit(0)->activate(); 
 +  
 +    LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; 
 +    llassert(shader); 
 +     
 +    shader->uniform4fv(LLShaderMgr::OBJE​CT_PLANE_S, 1, tp0.mV); 
 +    shader->uniform4fv(LLShaderMgr::OBJE​CT_PLANE_T, 1, tp1.mV); 
 +  
 +    gGL.matrixMode(LLRender::MM_TEXTURE)​; 
 +    gGL.loadIdentity(); 
 +    gGL.matrixMode(LLRender::MM_MODELVIE​W); 
 + 
    // GL_BLEND disabled by default     // GL_BLEND disabled by default
    drawLoop();     drawLoop();
 + 
    // Disable multitexture     // Disable multitexture
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_ALPHARAMP); 
    sShader->disableTexture(LLViewerShad​erMgr::TERRAIN_DETAIL0);     sShader->disableTexture(LLViewerShad​erMgr::TERRAIN_DETAIL0);
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_DETAIL1); + 
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_DETAIL2); +
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_DETAIL3); +
- +
- / gGL.getTexUnit(alpha_ramp)->unbind(LLTex​Unit::TT_TEXTURE); +
- // gGL.getTexUnit(4)->disable(); +
- // gGL.getTexUnit(4)->activate(); +
- +
- // gGL.getTexUnit(detail3)->unbind(LLTexUni​t::TT_TEXTURE); +
- // gGL.getTexUnit(3)->disable(); +
- // gGL.getTexUnit(3)->activate(); +
- +
- // gGL.matrixMode(LLRender::MM_TEXTURE); +
- // gGL.loadIdentity(); +
- // gGL.matrixMode(LLRender::MM_MODELVIEW); ​+
- +
- // gGL.getTexUnit(detail2)->unbind(LLTexUni​t::TT_TEXTURE); +
- // gGL.getTexUnit(2)->disable(); +
- // gGL.getTexUnit(2)->activate(); +
- +
- // gGL.matrixMode(LLRender::MM_TEXTURE); +
- // gGL.loadIdentity(); +
- // gGL.matrixMode(LLRender::MM_MODELVIEW); ​+
- +
- // gGL.getTexUnit(detail1)->unbind(LLTexUni​t::TT_TEXTURE); +
- // gGL.getTexUnit(1)->disable(); +
- // gGL.getTexUnit(1)->activate(); +
- +
- // gGL.matrixMode(LLRender::MM_TEXTURE); +
- // gGL.loadIdentity(); +
- // gGL.matrixMode(LLRender::MM_MODELVIEW); ​+
    //----------------------------------​----------------------------------------​--     //----------------------------------​----------------------------------------​--
    // Restore Texture Unit 0 defaults     // Restore Texture Unit 0 defaults
 +    
    gGL.getTexUnit(detail0)->unbind(LLTe​xUnit::TT_TEXTURE);     gGL.getTexUnit(detail0)->unbind(LLTe​xUnit::TT_TEXTURE);
    gGL.getTexUnit(0)->enable(LLTexUnit:​:TT_TEXTURE);     gGL.getTexUnit(0)->enable(LLTexUnit:​:TT_TEXTURE);
Line 95: Line 83:
    gGL.matrixMode(LLRender::MM_MODELVIE​W);     gGL.matrixMode(LLRender::MM_MODELVIE​W);
 }  }
 +
 +- llviewerregion.cpp
 +-- void LLViewerRegion::unpackRegionHandshake()
 +    mCentralBakeVersion = region_protocols & 1; // was (S32)gSavedSettings.getBOOL("UseServerTextureBaking");
 +    LLVLComposition *compp = getComposition();
 +    if (compp)
 +    {
 +     LLUUID tmp_id;
 + 
 +     msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id);
 +     compp->setDetailTextureID(0, tmp_id);
 +     msg->getUUID("RegionInfo", "TerrainDetail1", tmp_id);
 +     compp->setDetailTextureID(1, tmp_id);
 +     msg->getUUID("RegionInfo", "TerrainDetail2", tmp_id);
 +     compp->setDetailTextureID(2, tmp_id);
 +     msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id);
 +     compp->setDetailTextureID(3, tmp_id);
 + 
 +     // Iseki
 +     tmp_id.set("1c5e544e-9198-4681-b87e-9868ae61e461");
 +     compp->setDetailTextureID(4, tmp_id);
 +
 +
 +- llvlcomposition.h
 +    enum ECorner
 +    {
 +     SOUTHWEST = 0,
 +     SOUTHEAST = 1,
 +     NORTHWEST = 2,
 +     NORTHEAST = 3,
 +     // Iseki
 +     //CORNER_COUNT = 4
 +     CORNER_COUNT = 5
 +    };


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

85 人のユーザが現在オンラインです。 (19 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 85

もっと...

アクセスカウンタ

今日 : 1187811878118781187811878
昨日 : 1753317533175331753317533
総計 : 2347502123475021234750212347502123475021234750212347502123475021
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com