aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/pipeline.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/pipeline.h100
1 files changed, 9 insertions, 91 deletions
diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h
index 7c56375..1ecb56e 100644
--- a/linden/indra/newview/pipeline.h
+++ b/linden/indra/newview/pipeline.h
@@ -129,8 +129,6 @@ public:
129 void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE); 129 void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE);
130 void markShift(LLDrawable *drawablep); 130 void markShift(LLDrawable *drawablep);
131 void markTextured(LLDrawable *drawablep); 131 void markTextured(LLDrawable *drawablep);
132 void markGLRebuild(LLGLUpdate* glu);
133 void markRebuild(LLSpatialGroup* group, BOOL priority = FALSE);
134 void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE); 132 void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE);
135 133
136 //get the object between start and end that's closest to start. 134 //get the object between start and end that's closest to start.
@@ -181,14 +179,10 @@ public:
181 void updateMove(); 179 void updateMove();
182 BOOL visibleObjectsInFrustum(LLCamera& camera); 180 BOOL visibleObjectsInFrustum(LLCamera& camera);
183 BOOL getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max); 181 BOOL getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max);
184 BOOL getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir = LLVector3(0,0,0));
185 void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane 182 void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane
186 void createObjects(F32 max_dtime); 183 void createObjects(F32 max_dtime);
187 void createObject(LLViewerObject* vobj); 184 void createObject(LLViewerObject* vobj);
188 void updateGeom(F32 max_dtime); 185 void updateGeom(F32 max_dtime);
189 void updateGL();
190 void rebuildPriorityGroups();
191 void rebuildGroups();
192 186
193 //calculate pixel area of given box from vantage point of given camera 187 //calculate pixel area of given box from vantage point of given camera
194 static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera); 188 static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
@@ -209,21 +203,12 @@ public:
209 void renderGeomDeferred(LLCamera& camera); 203 void renderGeomDeferred(LLCamera& camera);
210 void renderGeomPostDeferred(LLCamera& camera); 204 void renderGeomPostDeferred(LLCamera& camera);
211 void renderGeomShadow(LLCamera& camera); 205 void renderGeomShadow(LLCamera& camera);
212 void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, LLRenderTarget* gi_source = NULL, LLRenderTarget* last_gi_post = NULL); 206 void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0);
213 void setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep);
214
215 void unbindDeferredShader(LLGLSLShader& shader); 207 void unbindDeferredShader(LLGLSLShader& shader);
216 void renderDeferredLighting(); 208 void renderDeferredLighting();
217 209
218 void generateWaterReflection(LLCamera& camera); 210 void generateWaterReflection(LLCamera& camera);
219 void generateSunShadow(LLCamera& camera); 211 void generateSunShadow(LLCamera& camera);
220 void generateHighlight(LLCamera& camera);
221 void renderHighlight(const LLViewerObject* obj, F32 fade);
222 void setHighlightObject(LLDrawable* obj) { mHighlightObject = obj; }
223
224
225 void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, BOOL use_shader = TRUE);
226 void generateGI(LLCamera& camera, LLVector3& lightDir, std::vector<LLVector3>& vpc); // KL sd
227 void renderHighlights(); 212 void renderHighlights();
228 void renderDebug(); 213 void renderDebug();
229 214
@@ -331,27 +316,15 @@ public:
331 RENDER_TYPE_INVISIBLE = LLDrawPool::POOL_INVISIBLE, 316 RENDER_TYPE_INVISIBLE = LLDrawPool::POOL_INVISIBLE,
332 RENDER_TYPE_VOIDWATER = LLDrawPool::POOL_VOIDWATER, 317 RENDER_TYPE_VOIDWATER = LLDrawPool::POOL_VOIDWATER,
333 RENDER_TYPE_WATER = LLDrawPool::POOL_WATER, 318 RENDER_TYPE_WATER = LLDrawPool::POOL_WATER,
334 RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA, 319 RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA,
335 RENDER_TYPE_GLOW = LLDrawPool::POOL_GLOW, 320 RENDER_TYPE_GLOW = LLDrawPool::POOL_GLOW,
336 RENDER_TYPE_PASS_SIMPLE = LLRenderPass::PASS_SIMPLE, 321
337 RENDER_TYPE_PASS_GRASS = LLRenderPass::PASS_GRASS,
338 RENDER_TYPE_PASS_FULLBRIGHT = LLRenderPass::PASS_FULLBRIGHT,
339 RENDER_TYPE_PASS_INVISIBLE = LLRenderPass::PASS_INVISIBLE,
340 RENDER_TYPE_PASS_INVISI_SHINY = LLRenderPass::PASS_INVISI_SHINY,
341 RENDER_TYPE_PASS_FULLBRIGHT_SHINY = LLRenderPass::PASS_FULLBRIGHT_SHINY,
342 RENDER_TYPE_PASS_SHINY = LLRenderPass::PASS_SHINY,
343 RENDER_TYPE_PASS_BUMP = LLRenderPass::PASS_BUMP,
344 RENDER_TYPE_PASS_GLOW = LLRenderPass::PASS_GLOW,
345 RENDER_TYPE_PASS_ALPHA = LLRenderPass::PASS_ALPHA,
346 RENDER_TYPE_PASS_ALPHA_MASK = LLRenderPass::PASS_ALPHA_MASK,
347 RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK = LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK,
348 RENDER_TYPE_PASS_ALPHA_SHADOW = LLRenderPass::PASS_ALPHA_SHADOW,
349 // Following are object types (only used in drawable mRenderType) 322 // Following are object types (only used in drawable mRenderType)
350 RENDER_TYPE_HUD = LLDrawPool::NUM_POOL_TYPES, 323 RENDER_TYPE_HUD = LLDrawPool::NUM_POOL_TYPES,
351 RENDER_TYPE_VOLUME, 324 RENDER_TYPE_VOLUME,
352 RENDER_TYPE_PARTICLES, 325 RENDER_TYPE_PARTICLES,
353 RENDER_TYPE_CLOUDS, 326 RENDER_TYPE_CLOUDS,
354 RENDER_TYPE_HUD_PARTICLES // KL S19? 327 RENDER_TYPE_HUD_PARTICLES
355 }; 328 };
356 329
357 enum LLRenderDebugFeatureMask 330 enum LLRenderDebugFeatureMask
@@ -389,7 +362,8 @@ public:
389 RENDER_DEBUG_SHAME = 0x0020000, 362 RENDER_DEBUG_SHAME = 0x0020000,
390 RENDER_DEBUG_SHADOW_FRUSTA = 0x0040000, 363 RENDER_DEBUG_SHADOW_FRUSTA = 0x0040000,
391 RENDER_DEBUG_SCULPTED = 0x0080000, 364 RENDER_DEBUG_SCULPTED = 0x0080000,
392 RENDER_DEBUG_BUILD_QUEUE = 0x0100000, 365 RENDER_DEBUG_AVATAR_VOLUME = 0x0100000,
366 RENDER_DEBUG_AGENT_TARGET = 0x0200000,
393 }; 367 };
394 368
395public: 369public:
@@ -448,36 +422,15 @@ public:
448 //screen texture 422 //screen texture
449 LLRenderTarget mScreen; 423 LLRenderTarget mScreen;
450 LLRenderTarget mDeferredScreen; 424 LLRenderTarget mDeferredScreen;
451 LLRenderTarget mDeferredDepth; 425 LLRenderTarget mDeferredLight[2];
452 LLRenderTarget mDeferredLight[3];
453 LLMultisampleBuffer mSampleBuffer; 426 LLMultisampleBuffer mSampleBuffer;
454 LLRenderTarget mGIMap;
455 LLRenderTarget mGIMapPost[2];
456 LLRenderTarget mLuminanceMap;
457 LLRenderTarget mHighlight;
458 427
459 //sun shadow map 428 //sun shadow map
460 LLRenderTarget mShadow[6]; 429 LLRenderTarget mSunShadow[4];
461 std::vector<LLVector3> mShadowFrustPoints[4];
462 LLVector4 mShadowError;
463 LLVector4 mShadowFOV;
464 LLVector3 mShadowFrustOrigin[4];
465 LLCamera mShadowCamera[8]; 430 LLCamera mShadowCamera[8];
466 LLVector3 mShadowExtents[4][2]; 431 LLVector3 mShadowExtents[4][2];
467 glh::matrix4f mSunShadowMatrix[6]; 432 glh::matrix4f mSunShadowMatrix[4];
468 glh::matrix4f mGIMatrix;
469 glh::matrix4f mGIMatrixProj;
470 glh::matrix4f mGINormalMatrix;
471 glh::matrix4f mGIInvProj;
472 LLVector2 mGIRange;
473 F32 mGILightRadius;
474
475 LLPointer<LLDrawable> mShadowSpotLight[2];
476 F32 mSpotLightFade[2];
477 LLPointer<LLDrawable> mTargetShadowSpotLight[2];
478
479 LLVector4 mSunClipPlanes; 433 LLVector4 mSunClipPlanes;
480 LLVector4 mSunOrthoClipPlanes;
481 434
482 LLVector2 mScreenScale; 435 LLVector2 mScreenScale;
483 436
@@ -492,8 +445,6 @@ public:
492 445
493 //noise map 446 //noise map
494 U32 mNoiseMap; 447 U32 mNoiseMap;
495 U32 mTrueNoiseMap;
496 U32 mLightFunc;
497 448
498 LLColor4 mSunDiffuse; 449 LLColor4 mSunDiffuse;
499 LLVector3 mSunDir; 450 LLVector3 mSunDir;
@@ -554,45 +505,12 @@ protected:
554 // 505 //
555 LLDrawable::drawable_list_t mBuildQ1; // priority 506 LLDrawable::drawable_list_t mBuildQ1; // priority
556 LLDrawable::drawable_list_t mBuildQ2; // non-priority 507 LLDrawable::drawable_list_t mBuildQ2; // non-priority
557 LLSpatialGroup::sg_list_t mGroupQ1; //priority
558 LLSpatialGroup::sg_vector_t mGroupQ2; // non-priority
559
560 LLViewerObject::vobj_list_t mCreateQ; 508 LLViewerObject::vobj_list_t mCreateQ;
561 509
562 LLDrawable::drawable_set_t mActiveQ; 510 LLDrawable::drawable_set_t mActiveQ;
563 511
564 LLDrawable::drawable_set_t mRetexturedList; 512 LLDrawable::drawable_set_t mRetexturedList;
565 513
566 class HighlightItem
567 {
568 public:
569 const LLPointer<LLDrawable> mItem;
570 mutable F32 mFade;
571
572 HighlightItem(LLDrawable* item)
573 : mItem(item), mFade(0)
574 {
575 }
576
577 bool operator<(const HighlightItem& rhs) const
578 {
579 return mItem < rhs.mItem;
580 }
581
582 bool operator==(const HighlightItem& rhs) const
583 {
584 return mItem == rhs.mItem;
585 }
586
587 void incrFade(F32 val) const
588 {
589 mFade = llclamp(mFade+val, 0.f, 1.f);
590 }
591 };
592
593 std::set<HighlightItem> mHighlightSet;
594 LLPointer<LLDrawable> mHighlightObject;
595
596 ////////////////////////////////////////////////// 514 //////////////////////////////////////////////////
597 // 515 //
598 // Draw pools are responsible for storing all rendered data, 516 // Draw pools are responsible for storing all rendered data,