//static void LLDrawPoolBump::beginShiny(bool invisible) { LLFastTimer t(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } mShiny = TRUE; sVertexMask = VERTEX_MASK_SHINY; // Second pass: environment map if (!invisible && mVertexShaderLevel > 1) { sVertexMask = VERTEX_MASK_SHINY | LLVertexBuffer::MAP_TEXCOORD0; } if (getVertexShaderLevel() > 0) { shader = &gObjectSimpleProgram[LLPipeline::sUnderWaterRender<<SHD_WATER_BIT | 1<<SHD_SHINY_BIT]; shader->bind(); } else { shader = NULL; } bindCubeMap(shader, mVertexShaderLevel, diffuse_channel, cube_channel, invisible); if (mVertexShaderLevel > 1) { //indexed texture rendering, channel 0 is always diffuse diffuse_channel = 0; } }
//static void LLDrawPoolBump::beginShiny(bool invisible) { LLFastTimer t(LLFastTimer::FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } mShiny = TRUE; sVertexMask = VERTEX_MASK_SHINY; // Second pass: environment map if (!invisible && mVertexShaderLevel > 1) { sVertexMask = VERTEX_MASK_SHINY | LLVertexBuffer::MAP_TEXCOORD0; } if (getVertexShaderLevel() > 0) { if (LLPipeline::sUnderWaterRender) { shader = &gObjectShinyWaterProgram; } else { shader = &gObjectShinyProgram; } shader->bind(); } else { shader = NULL; } bindCubeMap(shader, mVertexShaderLevel, diffuse_channel, cube_channel, invisible); }