1 // 2 // Copyright 2019 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // RewriteCubeMapSamplersAs2DArray: Change samplerCube samplers to sampler2DArray, and the 7 // textureCube* function calls to calls to helper functions that select the cube map face and sample 8 // from the face as a 2D texture. This emulates seamful cube map sampling in ES2 (or desktop GL 2) 9 // and therefore only looks at samplerCube (i.e. not integer variants or cube arrays) and sampling 10 // functions that are defined in ES GLSL 1.0 (i.e. not the cube overload of texture()). 11 12 #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITECUBEMAPSAMPLERSAS2DARRAY_H_ 13 #define COMPILER_TRANSLATOR_TREEOPS_REWRITECUBEMAPSAMPLERSAS2DARRAY_H_ 14 15 #include "common/angleutils.h" 16 17 namespace sh 18 { 19 class TCompiler; 20 class TIntermBlock; 21 class TSymbolTable; 22 23 ANGLE_NO_DISCARD bool RewriteCubeMapSamplersAs2DArray(TCompiler *compiler, 24 TIntermBlock *root, 25 TSymbolTable *symbolTable, 26 bool isFragmentShader); 27 } // namespace sh 28 29 #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITECUBEMAPSAMPLERSAS2DARRAY_H_ 30