<?xml version="1.0" encoding="US-ASCII"?>
<!-- DFS Xcelerate Taxonomy Schema - http://www.dfsco.com/financial-services/ -->
<!-- Version: 6.23.6 -->
<!-- Round: 5912551e-4d31-456b-8ed1-fe30b1f3876d -->
<!-- Creation date: 2019-02-09T01:27:09Z -->
<!-- Copyright (c) 2017 Donnelley Financial, LLC. All Rights Reserved. -->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:xbrli="http://www.xbrl.org/2003/instance"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:srt-types="http://fasb.org/srt-types/2018-01-31"
  xmlns:srt="http://fasb.org/srt/2018-01-31"
  xmlns:us-gaap="http://fasb.org/us-gaap/2018-01-31"
  xmlns:us-types="http://fasb.org/us-types/2018-01-31"
  xmlns:trex="http://www.trex.com/20181231"
  xmlns:nonnum="http://www.xbrl.org/dtr/type/non-numeric"
  xmlns:num="http://www.xbrl.org/dtr/type/numeric"
  xmlns:xbrldt="http://xbrl.org/2005/xbrldt"
  xmlns:country="http://xbrl.sec.gov/country/2017-01-31"
  xmlns:currency="http://xbrl.sec.gov/currency/2017-01-31"
  xmlns:dei="http://xbrl.sec.gov/dei/2018-01-31"
  xmlns:exch="http://xbrl.sec.gov/exch/2018-01-31"
  xmlns:invest="http://xbrl.sec.gov/invest/2013-01-31"
  xmlns:naics="http://xbrl.sec.gov/naics/2017-01-31"
  xmlns:sic="http://xbrl.sec.gov/sic/2011-01-31"
  xmlns:stpr="http://xbrl.sec.gov/stpr/2018-01-31"
  targetNamespace="http://www.trex.com/20181231"
  elementFormDefault="qualified" attributeFormDefault="unqualified">
  <annotation>
    <appinfo>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DocumentandEntityInformation" id="DocumentandEntityInformation">
        <link:definition>101 - Document - Document and Entity Information</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/StatementOfIncome" id="StatementOfIncome">
        <link:definition>103 - Statement - Consolidated Statements of Comprehensive Income</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/StatementOfFinancialPositionClassified" id="StatementOfFinancialPositionClassified">
        <link:definition>104 - Statement - Consolidated Balance Sheets</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/StatementOfFinancialPositionClassifiedParenthetical" id="StatementOfFinancialPositionClassifiedParen">
        <link:definition>105 - Statement - Consolidated Balance Sheets (Parenthetical)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/StatementOfShareholdersEquityAndOtherComprehensiveIncome" id="StatementOfShareholdersEquityAndOtherComprehensiveIncome">
        <link:definition>106 - Statement - Statements of Changes in Stockholders' Equity</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/StatementOfCashFlowsIndirect" id="StatementOfCashFlowsIndirect">
        <link:definition>107 - Statement - Consolidated Statements of Cash Flows</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsNatureOfOperations" id="Role_NotesToFinancialStatementsNatureOfOperations">
        <link:definition>108 - Disclosure - Business and Organization</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlock" id="Role_NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlock">
        <link:definition>109 - Disclosure - Summary of Significant Accounting Policies</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBusinessCombinationDisclosureTextBlock" id="Role_NotesToFinancialStatementsBusinessCombinationDisclosureTextBlock">
        <link:definition>110 - Disclosure - Acquisition</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsInventoryDisclosureTextBlock" id="Role_NotesToFinancialStatementsInventoryDisclosureTextBlock">
        <link:definition>111 - Disclosure - Inventories</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlock" id="Role_NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlock">
        <link:definition>112 - Disclosure - Prepaid Expenses and Other Assets</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock" id="Role_NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock">
        <link:definition>113 - Disclosure - Goodwill and Other Intangible Assets</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlock" id="Role_NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlock">
        <link:definition>114 - Disclosure - Property, Plant and Equipment</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" id="Role_NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock">
        <link:definition>115 - Disclosure - Accrued Expenses and Other Liabilities</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlock" id="Role_NotesToFinancialStatementsDebtDisclosureTextBlock">
        <link:definition>116 - Disclosure - Debt</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsFinancialInstrumentsDisclosureTextBlock" id="Role_NotesToFinancialStatementsFinancialInstrumentsDisclosureTextBlock">
        <link:definition>117 - Disclosure - Financial Instruments</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock" id="Role_NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock">
        <link:definition>118 - Disclosure - Stockholders' Equity</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlock" id="Role_NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlock">
        <link:definition>119 - Disclosure - Revenue From Contract With Customer</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock" id="Role_NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock">
        <link:definition>120 - Disclosure - Stock-Based Compensation</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlock" id="Role_NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlock">
        <link:definition>121 - Disclosure - Leases</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCompensationAndEmployeeBenefitPlansOtherThanShareBasedCompensationTextBlock" id="Role_NotesToFinancialStatementsCompensationAndEmployeeBenefitPlansOtherThanShareBasedCompensationTextBlock">
        <link:definition>122 - Disclosure - Employee Benefit Plans</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsIncomeTaxDisclosureTextBlock" id="Role_NotesToFinancialStatementsIncomeTaxDisclosureTextBlock">
        <link:definition>123 - Disclosure - Income Taxes</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlock" id="Role_NotesToFinancialStatementsSegmentReportingDisclosureTextBlock">
        <link:definition>124 - Disclosure - Segment Information</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSeasonalityDisclosureTextBlock" id="Role_NotesToFinancialStatementsSeasonalityDisclosureTextBlock">
        <link:definition>125 - Disclosure - Seasonality</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock" id="Role_NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock">
        <link:definition>126 - Disclosure - Commitments and Contingencies</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsQuarterlyFinancialInformationTextBlock" id="Role_NotesToFinancialStatementsQuarterlyFinancialInformationTextBlock">
        <link:definition>127 - Disclosure - Interim Financial Data (Unaudited)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock" id="Role_NotesToFinancialStatementsScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock">
        <link:definition>128 - Disclosure - Schedule II - Valuation and Qualifying Accounts and Reserves</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockPolicies" id="Role_NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockPolicies">
        <link:definition>129 - Disclosure - Summary of Significant Accounting Policies (Policies)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockTables" id="Role_NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockTables">
        <link:definition>130 - Disclosure - Summary of Significant Accounting Policies (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBusinessCombinationDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsBusinessCombinationDisclosureTextBlockTables">
        <link:definition>131 - Disclosure - Acquisition (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsInventoryDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsInventoryDisclosureTextBlockTables">
        <link:definition>132 - Disclosure - Inventories (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlockTables">
        <link:definition>133 - Disclosure - Prepaid Expenses and Other Assets (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlockTables">
        <link:definition>134 - Disclosure - Goodwill and Other Intangible Assets (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlockTables">
        <link:definition>135 - Disclosure - Property, Plant and Equipment (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlockTables" id="Role_NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlockTables">
        <link:definition>136 - Disclosure - Accrued Expenses and Other Liabilities (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlockTables">
        <link:definition>137 - Disclosure - Stockholders' Equity (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlockTables" id="Role_NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlockTables">
        <link:definition>138 - Disclosure - Revenue From Contract With Customer (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlockTables" id="Role_NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlockTables">
        <link:definition>139 - Disclosure - Stock-Based Compensation (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlockTables">
        <link:definition>140 - Disclosure - Leases (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsIncomeTaxDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsIncomeTaxDisclosureTextBlockTables">
        <link:definition>141 - Disclosure - Income Taxes (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsSegmentReportingDisclosureTextBlockTables">
        <link:definition>142 - Disclosure - Segment Information (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables" id="Role_NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables">
        <link:definition>143 - Disclosure - Commitments and Contingencies (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsQuarterlyFinancialInformationTextBlockTables" id="Role_NotesToFinancialStatementsQuarterlyFinancialInformationTextBlockTables">
        <link:definition>144 - Disclosure - Interim Financial Data (Unaudited) (Tables)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureBusinessAndOrganizationAdditionalInformation" id="DisclosureBusinessAndOrganizationAdditionalInformation">
        <link:definition>145 - Disclosure - Business and Organization - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformation" id="DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformation">
        <link:definition>146 - Disclosure - Summary of Significant Accounting Policies - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesOfPropertyPlantAndEquipment" id="DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesOfPropertyPlantAndEquipment">
        <link:definition>147 - Disclosure - Summary of Significant Accounting Policies - Estimated Useful Lives of Property Plant and Equipment (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureAcquisitionAdditionalInformation" id="DisclosureAcquisitionAdditionalInformation">
        <link:definition>148 - Disclosure - Acquisition - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureAcquisitionSummaryOfConsiderationAllocatedToAssetsAcquiredAndLiabilitiesAssumed" id="DisclosureAcquisitionSummaryOfConsiderationAllocatedToAssetsAcquiredAndLiabilitiesAssumed">
        <link:definition>149 - Disclosure - Acquisition - Summary of Consideration Allocated to Assets Acquired and Liabilities Assumed (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureInventoriesSummaryOfInventories" id="DisclosureInventoriesSummaryOfInventories">
        <link:definition>150 - Disclosure - Inventories - Summary of Inventories (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureInventoriesAdditionalInformation" id="DisclosureInventoriesAdditionalInformation">
        <link:definition>151 - Disclosure - Inventories - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosurePrepaidExpensesAndOtherAssetsSummaryOfPrepaidExpensesAndOtherAssets" id="DisclosurePrepaidExpensesAndOtherAssetsSummaryOfPrepaidExpensesAndOtherAssets">
        <link:definition>152 - Disclosure - Prepaid Expenses and Other Assets - Summary of Prepaid Expenses and Other Assets (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsAdditionalInformation" id="DisclosureGoodwillAndOtherIntangibleAssetsAdditionalInformation">
        <link:definition>153 - Disclosure - Goodwill and Other Intangible Assets - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsDetailsOfIntangibleAssets" id="DisclosureGoodwillAndOtherIntangibleAssetsDetailsOfIntangibleAssets">
        <link:definition>154 - Disclosure - Goodwill and Other Intangible Assets - Details of Intangible Assets (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosurePropertyPlantAndEquipmentSummaryOfPropertyPlantAndEquipment" id="DisclosurePropertyPlantAndEquipmentSummaryOfPropertyPlantAndEquipment">
        <link:definition>155 - Disclosure - Property, Plant and Equipment - Summary of Property, Plant and Equipment (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosurePropertyPlantAndEquipmentAdditionalInformation" id="DisclosurePropertyPlantAndEquipmentAdditionalInformation">
        <link:definition>156 - Disclosure - Property, Plant and Equipment - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureAccruedExpensesAndOtherLiabilitiesSummaryOfAccruedExpensesAndOtherLiabilities" id="DisclosureAccruedExpensesAndOtherLiabilitiesSummaryOfAccruedExpensesAndOtherLiabilities">
        <link:definition>157 - Disclosure - Accrued Expenses and Other Liabilities - Summary of Accrued Expenses and Other Liabilities (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureDebtAdditionalInformation" id="DisclosureDebtAdditionalInformation">
        <link:definition>158 - Disclosure - Debt - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityAdditionalInformation" id="DisclosureStockholdersEquityAdditionalInformation">
        <link:definition>159 - Disclosure - Stockholders' Equity - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityComputationOfBasicAndDilutedEarningsPerShare" id="DisclosureStockholdersEquityComputationOfBasicAndDilutedEarningsPerShare">
        <link:definition>160 - Disclosure - Stockholders' Equity - Computation of Basic and Diluted Earnings Per Share (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShare" id="DisclosureStockholdersEquityAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShare">
        <link:definition>161 - Disclosure - Stockholders' Equity - Antidilutive Securities Excluded from Computation of Earnings Per Share (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureRevenueFromContractsWithCustomersAdditionalInformation" id="DisclosureRevenueFromContractsWithCustomersAdditionalInformation">
        <link:definition>162 - Disclosure - Revenue From Contracts With Customers - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureRevenueFromContractsWithCustomersSummaryOfDisaggregatedNetSales" id="DisclosureRevenueFromContractsWithCustomersSummaryOfDisaggregatedNetSales">
        <link:definition>163 - Disclosure - Revenue From Contracts With Customers - Summary of Disaggregated Net Sales (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationAdditionalInformation" id="DisclosureStockBasedCompensationAdditionalInformation">
        <link:definition>164 - Disclosure - Stock-Based Compensation - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSummaryOfStockBasedCompensationExpenses" id="DisclosureStockBasedCompensationSummaryOfStockBasedCompensationExpenses">
        <link:definition>165 - Disclosure - Stock-Based Compensation - Summary of Stock-Based Compensation Expenses (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationTimeBasedRestrictedStockAndRestrictedStockUnitActivity" id="DisclosureStockBasedCompensationTimeBasedRestrictedStockAndRestrictedStockUnitActivity">
        <link:definition>166 - Disclosure - Stock-Based Compensation - Time-Based Restricted Stock and Restricted Stock Unit Activity (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationPerformanceBasedRestrictedStockActivity" id="DisclosureStockBasedCompensationPerformanceBasedRestrictedStockActivity">
        <link:definition>167 - Disclosure - Stock-Based Compensation - Performance-Based Restricted Stock Activity (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSummaryOfAssumptionsUsedToEstimateFairValueOfEachSAR" id="DisclosureStockBasedCompensationSummaryOfAssumptionsUsedToEstimateFairValueOfEachSAR">
        <link:definition>168 - Disclosure - Stock-Based Compensation - Summary of Assumptions Used to Estimate Fair Value of Each SAR (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSARActivity" id="DisclosureStockBasedCompensationSARActivity">
        <link:definition>169 - Disclosure - Stock-Based Compensation - SAR Activity (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureLeasesMinimumAnnualPaymentsUnderNonCancelableLeases" id="DisclosureLeasesMinimumAnnualPaymentsUnderNonCancelableLeases">
        <link:definition>170 - Disclosure - Leases - Minimum Annual Payments Under Non-Cancelable Leases (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureLeasesAdditionalInformation" id="DisclosureLeasesAdditionalInformation">
        <link:definition>171 - Disclosure - Leases - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureEmployeeBenefitPlansAdditionalInformation" id="DisclosureEmployeeBenefitPlansAdditionalInformation">
        <link:definition>172 - Disclosure - Employee Benefit Plans - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesIncomeTaxProvisionBenefit" id="DisclosureIncomeTaxesIncomeTaxProvisionBenefit">
        <link:definition>173 - Disclosure - Income Taxes - Income Tax Provision (Benefit) (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesReconciliationOfDifferencesBetweenIncomeTaxProvisionAndIncomeTaxDeterminedByApplyingUSFederalStatutoryRate" id="DisclosureIncomeTaxesReconciliationOfDifferencesBetweenIncomeTaxProvisionAndIncomeTaxDeterminedByApplyingUSFederalStatutoryRate">
        <link:definition>174 - Disclosure - Income Taxes - Reconciliation of Differences between Income Tax Provision and Income Tax Determined by Applying US Federal Statutory Rate (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesScheduleOfDeferredTaxAssetsAndLiabilities" id="DisclosureIncomeTaxesScheduleOfDeferredTaxAssetsAndLiabilities">
        <link:definition>175 - Disclosure - Income Taxes - Schedule of Deferred Tax Assets and Liabilities (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesAdditionalInformation" id="DisclosureIncomeTaxesAdditionalInformation">
        <link:definition>176 - Disclosure - Income Taxes - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationAdditionalInformation" id="DisclosureSegmentInformationAdditionalInformation">
        <link:definition>177 - Disclosure - Segment Information - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationDetailsOfSegmentInformation" id="DisclosureSegmentInformationDetailsOfSegmentInformation">
        <link:definition>178 - Disclosure - Segment Information - Details of Segment Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationScheduleOfReconciliationOfNetIncomeToEBITDA" id="DisclosureSegmentInformationScheduleOfReconciliationOfNetIncomeToEBITDA">
        <link:definition>179 - Disclosure - Segment Information - Schedule of Reconciliation of Net Income to EBITDA (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureCommitmentsAndContingenciesAdditionalInformation" id="DisclosureCommitmentsAndContingenciesAdditionalInformation">
        <link:definition>180 - Disclosure - Commitments and Contingencies - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureCommitmentsAndContingenciesSummaryOfReconciliationOfCompanysResidentialProductWarrantyReserve" id="DisclosureCommitmentsAndContingenciesSummaryOfReconciliationOfCompanysResidentialProductWarrantyReserve">
        <link:definition>181 - Disclosure - Commitments and Contingencies - Summary of Reconciliation of Company's Residential Product Warranty Reserve (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureInterimFinancialDataUnauditedSummaryOfInterimFinancialData" id="DisclosureInterimFinancialDataUnauditedSummaryOfInterimFinancialData">
        <link:definition>182 - Disclosure - Interim Financial Data (Unaudited) - Summary of Interim Financial Data (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureInterimFinancialDataUnauditedAdditionalInformation" id="DisclosureInterimFinancialDataUnauditedAdditionalInformation">
        <link:definition>183 - Disclosure - Interim Financial Data (Unaudited) - Additional Information (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType roleURI="http://www.trex.com/taxonomy/role/DisclosureScheduleIIValuationAndQualifyingAccountsAndReserves" id="DisclosureScheduleIIValuationAndQualifyingAccountsAndReserves">
        <link:definition>184 - Disclosure - Schedule II - Valuation and Qualifying Accounts and Reserves (Detail)</link:definition>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:linkbaseRef xlink:type="simple" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:role="http://www.xbrl.org/2003/role/calculationLinkbaseRef" xlink:href="trex-20181231_cal.xml" xlink:title="Calculation Links, all"/>
      <link:linkbaseRef xlink:type="simple" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef" xlink:href="trex-20181231_def.xml" xlink:title="Definition Links, all"/>
      <link:linkbaseRef xlink:type="simple" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef" xlink:href="trex-20181231_lab.xml" xlink:title="Label Links, all"/>
      <link:linkbaseRef xlink:type="simple" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:role="http://www.xbrl.org/2003/role/presentationLinkbaseRef" xlink:href="trex-20181231_pre.xml" xlink:title="Presentation Links, all"/>
    </appinfo>
  </annotation>
  <import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
  <import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"/>
  <import namespace="http://fasb.org/srt-types/2018-01-31" schemaLocation="http://xbrl.fasb.org/srt/2018/elts/srt-types-2018-01-31.xsd"/>
  <import namespace="http://fasb.org/us-types/2018-01-31" schemaLocation="http://xbrl.fasb.org/us-gaap/2018/elts/us-types-2018-01-31.xsd"/>
  <import namespace="http://www.xbrl.org/dtr/type/non-numeric" schemaLocation="http://www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd"/>
  <import namespace="http://www.xbrl.org/dtr/type/numeric" schemaLocation="http://www.xbrl.org/dtr/type/numeric-2009-12-16.xsd"/>
  <import namespace="http://xbrl.org/2005/xbrldt" schemaLocation="http://www.xbrl.org/2005/xbrldt-2005.xsd"/>
  <import namespace="http://fasb.org/srt/2018-01-31" schemaLocation="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd"/>
  <import namespace="http://fasb.org/us-gaap/2018-01-31" schemaLocation="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/country/2017-01-31" schemaLocation="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/currency/2017-01-31" schemaLocation="https://xbrl.sec.gov/currency/2017/currency-2017-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/dei/2018-01-31" schemaLocation="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/exch/2018-01-31" schemaLocation="https://xbrl.sec.gov/exch/2018/exch-2018-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/invest/2013-01-31" schemaLocation="https://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/naics/2017-01-31" schemaLocation="https://xbrl.sec.gov/naics/2017/naics-2017-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/sic/2011-01-31" schemaLocation="https://xbrl.sec.gov/sic/2011/sic-2011-01-31.xsd"/>
  <import namespace="http://xbrl.sec.gov/stpr/2018-01-31" schemaLocation="https://xbrl.sec.gov/stpr/2018/stpr-2018-01-31.xsd"/>
  <element name="AccountingPoliciesTable" id="trex_AccountingPoliciesTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrldt:hypercubeItem"/>
  <element name="AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" id="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="AccruedManufacturingExpensesCurrent" id="trex_AccruedManufacturingExpensesCurrent" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="AveragePeriodForPeMaterialPurchasesUnderShortTermSupplyContractsForWhichPricingIsNegotiatedAsNeeded" id="trex_AveragePeriodForPeMaterialPurchasesUnderShortTermSupplyContractsForWhichPricingIsNegotiatedAsNeeded" type="xbrli:durationItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BillingsInExcessOfRevenuesCurrent" id="trex_BillingsInExcessOfRevenuesCurrent" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BusinessCombinationIncreaseDecreaseToReflectLiabilitiesAcquiredAtFairValueAbstract" id="trex_BusinessCombinationIncreaseDecreaseToReflectLiabilitiesAcquiredAtFairValueAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAccruedLiabilitiesAndOtherExpenses" id="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAccruedLiabilitiesAndOtherExpenses" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedBillingsInExcessOfCost" id="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedBillingsInExcessOfCost" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedContractsRetainage" id="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedContractsRetainage" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="debit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCostsAndEstimatedEarningsInExcessOfBillingsOnUncompletedContracts" id="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCostsAndEstimatedEarningsInExcessOfBillingsOnUncompletedContracts" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="debit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerDeposits" id="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerDeposits" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CapitalExpenditure" id="trex_CapitalExpenditure" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ChargeToEarningsToFullyReserveEquityInvestmentAndNote" id="trex_ChargeToEarningsToFullyReserveEquityInvestmentAndNote" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" xbrli:balance="debit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CommercialRailingAndStagingSystemsMember" id="trex_CommercialRailingAndStagingSystemsMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CommercialUseMember" id="trex_CommercialUseMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ComponentsOfBasicAndDilutedEarningPerShareLineItems" id="trex_ComponentsOfBasicAndDilutedEarningPerShareLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ComponentsOfBasicAndDilutedEarningPerShareTable" id="trex_ComponentsOfBasicAndDilutedEarningPerShareTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrldt:hypercubeItem"/>
  <element name="ConsolidatedDebtToEarningsBeforeInterestTaxesDepreciationAmortizationRatioAsPerCreditAgreement" id="trex_ConsolidatedDebtToEarningsBeforeInterestTaxesDepreciationAmortizationRatioAsPerCreditAgreement" type="xbrli:pureItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CustomerBacklogMember" id="trex_CustomerBacklogMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CustomerFourMember" id="trex_CustomerFourMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CustomerOneMember" id="trex_CustomerOneMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CustomerThreeMember" id="trex_CustomerThreeMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="CustomerTwoMember" id="trex_CustomerTwoMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="DeferredTaxLiabilitiesDepreciation" id="trex_DeferredTaxLiabilitiesDepreciation" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="DeferredTaxLiabilitiesGoodwillAmortization" id="trex_DeferredTaxLiabilitiesGoodwillAmortization" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="DeferredTaxLiabilitiesInventoriesAndOther" id="trex_DeferredTaxLiabilitiesInventoriesAndOther" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="DefinedContributionPlanEmployeeAdditionalContributionAmount" id="trex_DefinedContributionPlanEmployeeAdditionalContributionAmount" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" xbrli:balance="debit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="DenplaxMember" id="trex_DenplaxMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="DocumentAndEntityInformationAbstract" id="trex_DocumentAndEntityInformationAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="EBITDA" id="trex_EBITDA" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="EmployeeStockPurchasePlanMember" id="trex_EmployeeStockPurchasePlanMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="FebruaryTwoThousandEighteenStockRepurchaseProgramMember" id="trex_FebruaryTwoThousandEighteenStockRepurchaseProgramMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="FebruaryTwoThousandSeventeenStockRepurchaseProgramMember" id="trex_FebruaryTwoThousandSeventeenStockRepurchaseProgramMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="FixedChargeCoverageRatioAsPerCreditAgreement" id="trex_FixedChargeCoverageRatioAsPerCreditAgreement" type="xbrli:pureItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ForkliftsAndTractorsMember" id="trex_ForkliftsAndTractorsMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="IntangibleLiabilityDisclosureAbstract" id="trex_IntangibleLiabilityDisclosureAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="LetterOfCreditFacilitySublimitMember" id="trex_LetterOfCreditFacilitySublimitMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="MaturityPeriodOfCashEquivalent" id="trex_MaturityPeriodOfCashEquivalent" type="xbrli:durationItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="NewAccountingStandardsNotYetAdoptedPolicyTextBlock" id="trex_NewAccountingStandardsNotYetAdoptedPolicyTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="NumberOfCustomerAccountedForTenPercentOrMoreAccountReceivable" id="trex_NumberOfCustomerAccountedForTenPercentOrMoreAccountReceivable" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="NumberOfCustomerAccountedForTenPercentOrMoreSalesOfNetSales" id="trex_NumberOfCustomerAccountedForTenPercentOrMoreSalesOfNetSales" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="NumberOfFinancialInstitutionWithDeposit" id="trex_NumberOfFinancialInstitutionWithDeposit" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="NumberOfLargestRawMaterialSuppliers" id="trex_NumberOfLargestRawMaterialSuppliers" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="NumberOfSalesRetailers" id="trex_NumberOfSalesRetailers" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="OctoberTwoThousandFifteenStockRepurchaseProgramMember" id="trex_OctoberTwoThousandFifteenStockRepurchaseProgramMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="OctoberTwoThousandFourteenStockRepurchaseProgramMember" id="trex_OctoberTwoThousandFourteenStockRepurchaseProgramMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="OtherResidentialMember" id="trex_OtherResidentialMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="PercentSensitivityChangeInExpectedSurfaceFlakingClaims" id="trex_PercentSensitivityChangeInExpectedSurfaceFlakingClaims" type="num:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="PerformanceBasedRestrictedStockAndPerformanceBasedRestrictedStockUnitsMember" id="trex_PerformanceBasedRestrictedStockAndPerformanceBasedRestrictedStockUnitsMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="PrepaidAndOtherCurrentAssetsDisclosureTextBlock" id="trex_PrepaidAndOtherCurrentAssetsDisclosureTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="PrepaidExpenseAndOtherAssetsCurrentTableTextBlock" id="trex_PrepaidExpenseAndOtherAssetsCurrentTableTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ProfitSharing401KPlanMember" id="trex_ProfitSharing401KPlanMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="PropertyPlantAndEquipmentEstimatedUsefulLifeTableTextBlock" id="trex_PropertyPlantAndEquipmentEstimatedUsefulLifeTableTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="RawMaterialsMember" id="trex_RawMaterialsMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="RawMaterialSupplyContractsMember" id="trex_RawMaterialSupplyContractsMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ResidentialUseMember" id="trex_ResidentialUseMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="RevolverLoansPortionEffectiveOneJanuaryThroughThirtyJuneMember" id="trex_RevolverLoansPortionEffectiveOneJanuaryThroughThirtyJuneMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="RevolverLoansPortionEffectiveOneJulyThroughThirtyFirstDecemberMember" id="trex_RevolverLoansPortionEffectiveOneJulyThroughThirtyFirstDecemberMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfAccruedLiabilitiesAndOtherCurrentLiabilitiesTableTextBlock" id="trex_ScheduleOfAccruedLiabilitiesAndOtherCurrentLiabilitiesTableTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfCommitmentsAndContingenciesLineItems" id="trex_ScheduleOfCommitmentsAndContingenciesLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfCommitmentsAndContingenciesTable" id="trex_ScheduleOfCommitmentsAndContingenciesTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrldt:hypercubeItem"/>
  <element name="ScheduleOfReconciliationOfNetIncomeToEBITDATableTextBlock" id="trex_ScheduleOfReconciliationOfNetIncomeToEBITDATableTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfRestrictedStockActivityLineItems" id="trex_ScheduleOfRestrictedStockActivityLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfRestrictedStockActivityTable" id="trex_ScheduleOfRestrictedStockActivityTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrldt:hypercubeItem"/>
  <element name="ScheduleOfSignificantAccountingPoliciesLineItems" id="trex_ScheduleOfSignificantAccountingPoliciesLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfStockAppreciationRightsActivityLineItems" id="trex_ScheduleOfStockAppreciationRightsActivityLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ScheduleOfStockAppreciationRightsActivityTable" id="trex_ScheduleOfStockAppreciationRightsActivityTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrldt:hypercubeItem"/>
  <element name="SeasonalityDisclosureTextBlock" id="trex_SeasonalityDisclosureTextBlock" type="nonnum:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SecondAmendedAndRestatedCreditAgreementMember" id="trex_SecondAmendedAndRestatedCreditAgreementMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SensitivityChangeInSurfaceFlakingWarrantyReserve" id="trex_SensitivityChangeInSurfaceFlakingWarrantyReserve" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentageToTargetNumberOfShares" id="trex_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentageToTargetNumberOfShares" type="num:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionGrantsInPeriodWeightedAverageGrantDateFairValuePerPricingModel" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionGrantsInPeriodWeightedAverageGrantDateFairValuePerPricingModel" type="num:perShareItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsAndMethodologyLineItems" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsAndMethodologyLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsAndMethodologyTable" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsAndMethodologyTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrldt:hypercubeItem"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsExercisable" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsExercisable" type="xbrli:sharesItemType" abstract="false" xbrli:periodType="instant" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SharebasedCompensationArrangementByShareBasedPaymentAwardNonoptionEquityInstrumentsVested" id="trex_SharebasedCompensationArrangementByShareBasedPaymentAwardNonoptionEquityInstrumentsVested" type="xbrli:sharesItemType" abstract="false" xbrli:periodType="instant" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsCanceledWeightedAverageGrantPrice" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsCanceledWeightedAverageGrantPrice" type="num:perShareItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsExercisableWeightedAverageGrantPrice" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsExercisableWeightedAverageGrantPrice" type="num:perShareItemType" abstract="false" xbrli:periodType="instant" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsExercisedWeightedAverageGrantPrice" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsExercisedWeightedAverageGrantPrice" type="num:perShareItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsGrantedWeightedAverageGrantPrice" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsGrantedWeightedAverageGrantPrice" type="num:perShareItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsOutstandingWeightedAverageGrantPrice" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsOutstandingWeightedAverageGrantPrice" type="num:perShareItemType" abstract="false" xbrli:periodType="instant" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsVestedWeightedAverageGrantPrice" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsEquityInstrumentsVestedWeightedAverageGrantPrice" type="num:perShareItemType" abstract="false" xbrli:periodType="instant" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsExercisableIntrinsicValue" id="trex_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionsExercisableIntrinsicValue" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" xbrli:balance="debit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SharebasedCompensationArrangementBySharebasedPaymentAwardNonOptionsExercisableWeightedAverageRemainingContractualTerm" id="trex_SharebasedCompensationArrangementBySharebasedPaymentAwardNonOptionsExercisableWeightedAverageRemainingContractualTerm" type="xbrli:durationItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SharebasedCompensationArrangementBySharebasedPaymentAwardNonOptionsVestedAndExpectedToVestOutstandingWeightedAverageRemainingContractualTerm" id="trex_SharebasedCompensationArrangementBySharebasedPaymentAwardNonOptionsVestedAndExpectedToVestOutstandingWeightedAverageRemainingContractualTerm" type="xbrli:durationItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="StagingConceptsAcquisitionLLCMember" id="trex_StagingConceptsAcquisitionLLCMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="StockIssuedSharesEmployeeStockPurchasePlan" id="trex_StockIssuedSharesEmployeeStockPurchasePlan" type="xbrli:sharesItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="StockRepurchaseProgramTerminationDate" id="trex_StockRepurchaseProgramTerminationDate" type="xbrli:dateItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SurfaceFlakingMember" id="trex_SurfaceFlakingMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SurfaceFlakingWarrantyReserveMember" id="trex_SurfaceFlakingWarrantyReserveMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="SwingAdvanceLoanSublimitMember" id="trex_SwingAdvanceLoanSublimitMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="TaxCutsAndJobsActOf2017ChangeInTaxRateIncomeTaxExpenseBenefit" id="trex_TaxCutsAndJobsActOf2017ChangeInTaxRateIncomeTaxExpenseBenefit" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" xbrli:balance="debit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ThirdAmendedAndRestatedCreditAgreementMember" id="trex_ThirdAmendedAndRestatedCreditAgreementMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="TimeBasedRestrictedStockAndTimeBasedRestrictedStockUnitsMember" id="trex_TimeBasedRestrictedStockAndTimeBasedRestrictedStockUnitsMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="TranscendEnhanceSelectAndUniversalFasciaProductMember" id="trex_TranscendEnhanceSelectAndUniversalFasciaProductMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="TrextrimAndTrexRevealRailingMember" id="trex_TrextrimAndTrexRevealRailingMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="TwoThousandFourteenStockIncentivePlanMember" id="trex_TwoThousandFourteenStockIncentivePlanMember" type="nonnum:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="UnrecognizedTaxBenefitsNumberOfTaxMattersIdentified" id="trex_UnrecognizedTaxBenefitsNumberOfTaxMattersIdentified" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="ValuationAllowanceForCreditLossesAndDisputedAmounts" id="trex_ValuationAllowanceForCreditLossesAndDisputedAmounts" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" xbrli:balance="credit" nillable="true" substitutionGroup="xbrli:item"/>
  <element name="WarrantyPeriod" id="trex_WarrantyPeriod" type="xbrli:durationItemType" abstract="false" xbrli:periodType="duration" nillable="true" substitutionGroup="xbrli:item"/>
</schema>
